0.8.18 • Published 6 months ago

@rarible/hardhat-deploy v0.8.18

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Hardhat Deploy

Network config must be created in config folder for deployment

Deployment

For a fresh deployment of the entire test suite on a new chain, use:

npx hardhat deploy --network <network_name> --tags all

For individual deployments:

npx hardhat deploy --network <network_name>

Contract Verification

Different chains use different verification methods:

For Etherscan-compatible chains (Ethereum, BSC, Polygon, etc.):

npx hardhat --network <network_name> etherscan-verify [--api-key <etherscan-apikey>] [--api-url <url>]

For Sourcify-compatible chains (Telos, etc.):

npx hardhat --network <network_name> sourcify

Verification Support by Chain:

  • Etherscan API:
    • Ethereum (Mainnet & testnets)
    • BSC
    • Polygon
    • Avalanche
    • (and other chains using Etherscan-compatible explorers)
  • Sourcify:
    • Telos
    • (other chains that don't support Etherscan API)

Generate Deployment Document

After verification, generate a list of deployed contracts and their addresses:

NETWORK="network-name" bash export-address-to-readme.bash

Testing

To run integration tests of contracts to deploy:

npx hardhat test