0

I am unable to verify the smart contract on Rinkeby testnet. I have deployed the code through truffle and developed using open-zeppelin. I have tried to look for solutions on this platform and I tried various ways mentioned but it is not helping me out.

I used oracles-combines-solidity to flatten the sol file and pasted the code in etherscan's solidity code but everytime I get the message below. Please help.

rinkeby etherscan verify contract

Edit: Following are the details:

TCRToken:0xf1608c8aead4d4feae7afe9dd9c657d27349d615, TCRSale:0x3bd1d8004fbd68b085d9b582729b9ad22698c813

Rinkeby URL: https://rinkeby.etherscan.io/token/0xf1608c8aead4d4feae7afe9dd9c657d27349d615

Source: https://github.com/parth5049/transboundary-credit-rating

  • Did you try what the tip suggests? – user19510 Jan 22 '18 at 18:57
  • Does it work if you don't use the flattener? (meaning if you cut and paste the contracts?) – thefett Jan 23 '18 at 3:34
  • @thefett how can I cut and paste around 10 contracts? Like I am using open-zeppelin and therefore my contract uses many other contracts like ERC20, StandardToken etc. – Parth Trivedi Jan 23 '18 at 11:41
  • @smarx Yes I have tried various possible combinations. Optimizer On, Off, Runs: 0, 200 etc. I am sure that compiler version is right. – Parth Trivedi Jan 23 '18 at 11:43
  • I doubt anyone will be able to help without being able to see the source code source code and the address of the contract. – user19510 Jan 23 '18 at 16:35
1

I was able to verify source code for both of these contracts on Rinkeby:

  • TCRToken: 0xf1608c8aead4d4feae7afe9dd9c657d27349d615
  • TCRSale: 0x3bd1d8004fbd68b085d9b582729b9ad22698c813

I cloned https://github.com/parth5049/transboundary-credit-rating and did npm install zeppelin-solidity.

Then I cloned https://github.com/poanetwork/oracles-combine-solidity, did an npm install, and then ran node index.js /full/path/to/transboundary-credit-rating/contracts/TCRToken.sol. This produced ./out/TCRToken.sol, which contained a properly flattened version of the source code.

I verified the source code using https://rinkeby.etherscan.io/verifyContract2, which supports the "run" option needed to verify contracts compiled with truffle. I used 0.4.18+commit.9cf6e910 as the compiler, optimizations enabled, and 200 runs.

Etherscan seemed to try to guess at the constructor parameters but got them wrong. TCRToken uses a single constructor parameter. ABI-encoded, it's 000000000000000000000000fdb0d9aca9f30d98d8bcbd54c596e764f6254fdc.

I followed a similar procedure to verify TCRSale, but that time the constructor parameters were correctly filled in by Etherscan, so I didn't have to change anything.

  • Thank you very much. I guess I was making the mistake of assuming the ABI-encoded parameter as it was generated by etherscan. Thank you again. I am now making some changes to the contract and will deploy soon. – Parth Trivedi Jan 24 '18 at 8:11

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.