Skip to content

CreamFi/hardhat-deploy-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Template for hardhat-deploy projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published