7

I'm trying to verify a contract on etherscan.io.

The contract itself has a number of imports and libraries and has been deployed using certain constructor arguments.

I've copy/pasted the code from all the .sol files into the validation textbox on etherscan, have selected the same compiler version, but am not entirely sure how to provide the ABI-encoded constructor arguments. Do they want the hex, JSON or what?

The code does not verify otherwise.

3

In case you want to use a simple online tool to encode parameters you could use https://abi.hashex.org

You insert the abi code to automatically parse parameters types or just enter them manually. In Function type selector constructor should be picked.

Here is an example, at the bottom are abi-encoded parameters that you enter in etherscan.io constructor parameters field input.

Example

2

Sorted.

  • Had pasted contracts in wrong order
  • Removed import references
  • Pasted constructor argument bytecode from end of deployed TX
  • 1
    I'm doing the same thing as yourself and I'm having trouble with finding out what to put for the ABI encoded constructor arguments. I'm using ethereum.github.io/browser-solidity to deploy the contract. – milkywaymasta Feb 9 '17 at 20:29
2

I was able to verify the contract on Etherscan by checking the "Input Data" of the transaction that created the contract. It includes the contract bytecode and the constructor argument bytecode right after. So you can copy the constructor argument bytecode into the "Constructor Arguments ABI-encoded" field to be able to verify the contract. Thanks for that 3rd bullet point!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.