2

I have a problem very similar to this Cannot verify contracts with libraries on Etherscan

Simple code

pragma solidity ^0.4.16; //optimization enabled

library C {
function a() returns (address) {
    return address(this);
}}

contract A {
function a() constant returns (address) {
    return C.a();
}}

The library confirmed fine https://kovan.etherscan.io/address/0x704aa2bfa624367854b98cb4167837384ba36417#code But the contract referencing the library doesn't verify https://kovan.etherscan.io/address/0xf2b6ec284e597aa52adb33ddefa39603cc0fb083

Including the library as

Library_1 Name: C

Library Contract Address: 0x704aa2bfa624367854b98cb4167837384ba36417

The verification bytecode output looks like this

6060604052341561000f57600080fd5b5b6101298061001f6000396000f300606060405263ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630dbe671f8114603c575b600080fd5b3415604657600080fd5b604c6075565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b600073__:C____________________________________630dbe671f6000604051602001526040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b151560de57600080fd5b6102c65a03f4151560ee57600080fd5b50505060405180519150505b905600a165627a7a723058209f5ef34399bb3ea506b876feebc5f333e41860061c53be57c401685375bfab310029

Which obviously does not match :C

1

For Library verification to work you have to use version 2.0 of Verify Contract Code (currently in Beta)

i.e. make sure the verification URL starts with https://etherscan.io/verifyContract2?a=

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.