This Node.js repository contains the configuration and deployment scripts for the HopeLend protocol core and periphery contracts. The repository makes use of hardhat
and hardhat-deploy
tools to facilitate the deployment of HopeLend protocol.
- Node.js >= 16
- Alchemy or Infura API key
- If you use a custom RPC node, you can change the default RPC provider URL at ./helpers/hardhat-config-helpers.ts:25.
- Etherscan API key (Optional)
-
Install Node.JS dependencies:
npm i
-
Compile contracts before running any other command, to generate Typechain TS typings:
npm run compile
Path | Description |
---|---|
deploy/ | Main deployment scripts dir location |
├─ 00-core/ | Core deployment, only needed to run once per network. |
├─ 01-periphery_pre/ | Periphery contracts deployment, only need to run once per network. |
├─ 02-market/ | Market deployment scripts, depends of Core and Periphery deployment. |
├─ 03-periphery_post/ | Periphery contracts deployment after market is deployed. |
├─ 04-upgrade/ | Upgrade contracts. |
deployments/ | Artifacts location of the deployments, contains the addresses, the abi, solidity input metadata and the constructor parameters. |
markets/ | Directory to configure HopeLend markets |
tasks/ | Hardhat tasks to setup and review market configs |
helpers/ | Utility helpers to manage configs and deployments |