Get Started

Learn how to query & interact with Morpho.

There is two ways to query & interact with Morpho Optimizers: 1. On-Chain using a Smart Contract, 2. Off-Chain, for instance using ethers.js. In this section, you will find concrete examples showing how to interact with Morpho Optimizers and how to query information about users!

  • The Morpho protocol is open-source and its source code can be found on the morpho-v1 repository.

  • It uses utility libraries open-sourced on the morpho-utils repository. --> All deployed contracts addresses are available in the deployments glossary in the Links section.

Table of Contents

Morpho uses delegateCalls to delegate logic to implementation contract and thus does not have an ABI with all existing events. --> Find here the complete ABIs addressing this issue.

Some dependencies allows you to ease the implementation of your scripts. --> Find here how to install the dependencies for solidity/ethers related scripts

Track positions on Morpho

How to:

Interact with Morpho

How to:

Full code examples

  • Morpho-Aave-V2 & Morpho Compound: The complete codebases of the examples provided in this section are also available on the morpho-onchain-examples for Solidity integration and on the morpho-offchain-examples for ethers.js and more generic off-chain integration repositories.

  • Morpho-Aave-V3: The examples provided in the following sections are provided in this github repository.

Error Logic

While executing transactions on Morpho contracts, one can fall on unrecognized "custom" errors. More details in the corresponding section.

Last updated

Logo

This documentation is provided by MorphoLabs, main contributor to Morpho DAO. For any question, reach out.