7

I am facing issues trying to verify a contract that I deployed on Rinkeby.

My contract constructor has 3 parameters, how do I pass values of these parameters in the contract verification form?

How do I determine the constructor ABI for my contract. Btw, I am using compiler version 4.11 and the contract was built using truffle framework.

Any help would be truly appreciated.

  • 1
    What types were the parameters? – Tjaden Hess Jul 9 '17 at 18:33
  • (address, uint, uint) => first is an address to which proceeds of the contract will be forwarded to, the second is the starting block number, the third is the ending block number. – Parthasarathy Ramanujam Jul 10 '17 at 17:48
3

Now it is very easy with ABI-encoded Online Converter

Step 1: Add parameters that you used to construct your contract

Step 2: Click Generate ABI

Step 3: Copy ABI-Encoded

Step 4: Back to Etherscan and pasted it to ABI-Encoded Textbox

enter image description here

0

For simple value types like address and uint, you just need to left-pad the values to 32 bytes and concatenate them.

For example, if my values were

  • 0x829bd824b016326a401d083b33d092293333a830
  • 4
  • 177772

the proper ABI encoding would be

000000000000000000000000829bd824b016326a401d083b33d092293333a8300000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000002b66c

For more complicated types or to do this automatically, you can use this JS tool

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.