Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
scripts
src
test
.env
.gitignore
LICENSE
README.md
package.json
tsconfig.json
tslint.json

README.md

npm buidler

buidler-etherscan

Buidler plugin for integration with Etherscan's contract verification service.

What

This plugin verifies your contracts on Etherscan.

Installation

npm install @nomiclabs/buidler-etherscan

And add the following statement to your buidler.config.js:

usePlugin("@nomiclabs/buidler-etherscan");

Tasks

This plugin provides the verify-contract task, which allows you to verify contracts through Etherscan's service.

Environment extensions

This plugin does not extend the environment.

Usage

You need to add the following Etherscan config to your buidler.config.js file:

module.exports = {
  etherscan: {
    // The url for the Etherscan API you want to use.
    // For example, here we're using the one for the Ropsten test network
    url: "https://api-ropsten.etherscan.io/api",
    // Your API key for Etherscan
    // Obtain one at https://etherscan.io/
    apiKey: "YOUR_ETHERSCAN_API_KEY"
  }
};

Lastly, run the verify-contract task like so:

npx buidler verify-contract --contract-name MyContract --address DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"

TypeScript support

You need to add this to your tsconfig.json's files array: "node_modules/@nomiclabs/buidler-etherscan/src/type-extensions.d.ts"

You can’t perform that action at this time.