Skip to content

๐Ÿƒ Learn how to interact off-chain with the Morpho-Compound protocol!

Notifications You must be signed in to change notification settings

morpho-labs/morpho-offchain-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Morpho-Compound Off-Chain Examples

Learn how to interact with the Morpho-Compound protocol off-chain using a Smart Contract!

Installation

This example repository uses yarn to manage dependencies.

git clone git@github.com:morpho-labs/morpho-offchain-examples.git
cd morpho-offchain-examples
yarn

Usage

Copy-paste .env.example, name it .env and fill it with the values you want to use:

  • PRIVATE_KEY: the private key of the hot wallet you want to use to supply/borrow through Morpho (:warning: never provide a program with the private key to your personal wallet!)
  • RPC_URL: the RPC url to use to query data from the blockchain (you can get a free one with main RPC providers: Alchemy, Infura, ...)
cp .env.example .env

Examples

Morpho-Compound

Morpho-Aave V2

  • MorphoSupplier.js: query supply-related data & supply through Morpho-Aave V2 using ethers.js
  • MorphoBorrower.js: query borrow-related data & borrow through Morpho-Aave V2 using ethers.js

About

๐Ÿƒ Learn how to interact off-chain with the Morpho-Compound protocol!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published