New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

truffle-plugin-verify

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

truffle-plugin-verify

[![NPM Version](https://img.shields.io/npm/v/truffle-plugin-verify.svg)](https://www.npmjs.com/package/truffle-plugin-verify) [![NPM Monthly Downloads](https://img.shields.io/npm/dm/truffle-plugin-verify.svg)](https://www.npmjs.com/package/truffle-plugin-

  • 0.2.0-alpha1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
998
decreased by-36.76%
Maintainers
1
Weekly downloads
 
Created
Source

truffle-plugin-verify

NPM Version NPM Monthly Downloads NPM License

This truffle plugin allows you to automatically verify your smart contracts source code on Etherscan, straight from the Truffle CLI.

Attention: This plugin is a very early work in progress, all information in this README is subject to change while in alpha.

Installation

  1. Install the plugin with npm
npm install truffle-plugin-verify
  1. Add the plugin to your truffle.js or truffle-config.js file
module.exports = {
  /* ... rest of truffle-config */

  plugins: [
    'truffle-plugin-verify'
  ]
}
  1. Generate an API Key on your Etherscan account (see the Etherscan website)
  2. Add your Etherscan API key to your truffle config (use something like dotenv to make sure you don't commit the api key)
module.exports = {
  /* ... rest of truffle-config */

  api_keys: {
    etherscan: 'MY_API_KEY'
  }
}

Usage

truffle run verify SmartContractName [--network networkName]

The network parameter should correspond to a network defined in the Truffle config file, with the correct network id set. The Ethereum main net and all public testnets are supported.

For example, if we defined rinkeby as network in Truffle, and we wish to verify the SimpleStorage contract:

truffle run verify SimpleStorage --network rinkeby

This can take some time, and will eventually either return Pass - Verified or Fail - Unable to verify.

Notes

This plugin gets compiler optimisation settings from the truffle config file, so make sure that your truffle config settings are the same as when your contracts were compiled.

Limitations & Roadmap

This plugin is in a very early version, so there is still functionality missing. Below is a non-exhaustive list of features that are currently missing from the plugin, that will be added in a later release.

  • The plugin has no graceful error handling, so be sure to follow the usage exactly
  • The plugin can only verify one smart contract at a time, instead of automatically verifying all deployed contracts
  • There is no automatic testing / build process in place

Support

If you found this plugin and can't wait for the above features to be completed, send me some Ξ or tokens at 0xe126b3E5d052f1F575828f61fEBA4f4f2603652a and tweet me @RoscoKalis to let me know what you want your money to go towards.

Keywords

FAQs

Package last updated on 17 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc