Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.15 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.15 KB

DeFi Hardhat Template

Tests

This is a Hardhat project template focused on the DeFi smart contracts development.

💾 Installation

npm i

🔌 Setup

Parameters

cp .env.example .env.<network>
code .env.<network>

Note: Where <network> is one of the networks configured in hadhat.config.ts (By default: hardhat, mainnet, goerli or bsc).

Typechain

The hardhat will generates typechain code for contracts under contracts/ folder. You can also have typechain code for external contracts (for instance, tests another DeFi protocols), you only need to put their ABIs inside of the typechain/abi and run npm run compile.

🧰 Test

npm run compile
npm test

Note: By default the tests will run against a forked Ethereum mainnet.

⛓️ Deploy & Verify

npm run <network>:deploy
npm run <network>:verify

Note: Etherscan (or BSCScan) API KEY is required for verification.