Getting Started
This guide helps you integrate Morpho Vaults into your project.
The onchain scripts are written in Solidity, and based on the Foundry toolkit. The offchain version is written in Typescript, and based on ethers-v6 library.
Installation
- Solidity (Foundry)
- Typescript (ethers v6)
- Typescript (Hardhat)
forge install morpho-org/metamorpho
Examples
An educational repository has been released for integrators and users:
It shows how to properly call the different Morpho Vaults functions from your own smart contract according to the operations you want to perform.
/// SETUP
...
// --- VIEW FUNCTIONS ---
/// @notice Returns the total assets deposited into a Morpho `vault`.
/// @param vault The address of the Morpho Vault.
function totalDepositVault(address vault) public view returns (uint256 totalAssets) {
totalAssets = IMetaMorpho(vault).totalAssets();
}
This package is used to provide a simple way to interact with the contracts with typed interfaces without having to import all ABIs.
See more in SDK section
yarn add @morpho-org/blue-typechain ethers@^6.0.0
Coming soon ☕