Skip to content

crisog/morpho-test

Repository files navigation

Morpho logo

Morpho Interactions 🕹️

Scripts to interact with Morpho Blue


Setup

  1. Install dependencies
yarn install
  1. Configure your .env
SEPOLIA_RPC_URL=
PRIVATE_KEY=
ETHERSCAN_API_KEY= # if you want your contracts to be verified automatically

Deployments

Deploy Collateral Token

npx hardhat ignition deploy ./ignition/modules/CollateralToken.ts --network sepolia --verify

Deploy Loan Token

npx hardhat ignition deploy ./ignition/modules/CollateralToken.ts --network sepolia --verify

Deploy Simple Oracle

npx hardhat ignition deploy ./ignition/modules/CollateralToken.ts --network sepolia --verify

Morpho Interactions

Create Market

Creates a lending market with specified loan and collateral tokens.

npx hardhat run scripts/create-market.ts

Supply

Supply loan tokens to a Morpho market (includes token approval).

npx hardhat run scripts/supply.ts

Supply Collateral

Provide collateral tokens to secure borrowed positions.

npx hardhat run scripts/supply-collateral.ts

Borrow

Borrow assets against supplied collateral.

npx hardhat run scripts/borrow.ts

About

Scripts to interact with Morpho Blue

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •