Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

How to verify contracts on etherscan #475

Closed
rstormsf opened this issue Jul 1, 2017 · 3 comments
Closed

How to verify contracts on etherscan #475

rstormsf opened this issue Jul 1, 2017 · 3 comments

Comments

@rstormsf
Copy link

rstormsf commented Jul 1, 2017

Lets say I have the following contact:

pragma solidity ^0.4.11;

import "zeppelin-solidity/contracts/crowdsale/Crowdsale.sol";

contract RomanCrowdsale is Crowdsale {
    function RomanCrowdsale(uint256 _startBlock, uint256 _endBlock, uint256 _rate, address _wallet) Crowdsale(_startBlock, _endBlock, _rate, _wallet) {
    }
}

How would you verify this contract on etherscan?

var RomanCrowdsale = artifacts.require("./RomanCrowdsale.sol");
module.exports = function(deployer, network, accounts) {
  deployer.deploy(RomanCrowdsale, web3.eth.blockNumber+5, web3.eth.blockNumber+1000000000000000, 1, accounts[1]);
};

Manually concatenated contract:
https://gist.github.com/rstormsf/c8ffc93a8ddd9c9edfcc2014672a8f59

Deployed: https://kovan.etherscan.io/verifyContract?a=0x9b0ec746d4b91742187071ad8d7c06dc7ba3a4c3

Should I copy/paste all inherited contracts that this contract is depended on?

@adklempner
Copy link
Contributor

From etherscan:

  1. Contracts that use "imports" will need to have the code concatenated into one file as we do not support "imports" in separate files

@interfect
Copy link

Contracts built with an unmodified Truffle can't be verified on Etherscan currently; we're waiting for Ehterscan to be updated to support a compiler option that Truffle passes.

See #456 (comment)

@tcoulter
Copy link
Contributor

Dupe of #456. Closing for housekeeping.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants