Skip to content

Latest commit

 

History

History
56 lines (30 loc) · 1.39 KB

README.md

File metadata and controls

56 lines (30 loc) · 1.39 KB

Hardhat-deploy template

Installation and Setup

Install dependencies

yarn

Setup environment variable

  • Option 1: export environment variable

      export WEB3_INFURA_PROJECT_ID=YourProjectID
      export ETHERSCAN_API_KEY=YourApiToken
    
  • Option 2: Use .env file

      cp .env.default .env
    

    fill in these values

      WEB3_INFURA_PROJECT_ID=
      ETHERSCAN_API_KEY=
      DEPLOY_PRIVATE_KEY= // Require only for production deployment
    

Basic Use

npx hardhat compile

Scripts

See CreamFi/cream-deployment on how to write scripts.

npx hardhat run scripts/myScript.ts --network <NETWORK>

Test

See CreamFi/comptroller-upgrade on how to write tests.

npx hardhat test test/myTest.js

Deploy

See CreamFi/cream-deployment on how to write deployment script.

npx hardhat deploy --tags <TAGS> --network <NETWORK>

Avaliable options: Read here

Commit deployments/ into git after deployment.

Verify

npx hardhat etherscan-verify --network <NETWORK>

Avaliable options: Read here