1

I am trying to verify source code on etherscan using API listed here. I have successfully verified the simple contracts (without constructor).

Now I am trying to verify a sample contract with constructor like:

pragma solidity ^0.5.0;


contract HelloWorld {
    address public owner;


    constructor (address _owner) public{
        owner = _owner;

    }

}

which is deployed here. I am passing the same encoded constructor argument as shown here. Code is running fine and returns OK response with the expected GUID. But the issue is that after all this, contract is not getting verified. And when i check the verification status here in the bottom. It says:

>> Fail - Unable to verify

I didn't get any clue of this issue anywhere. Nothing seems wrong but it is not working.

0

I got it worked. Actually error was in passing the compilerversion. It was expecting the complete qualified compiler version with commit. SO for a pragma 0.5.0, we need to pass v0.5.1+commit.c8a2cb62.

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.