Skip to content

kendricktan/etherscan-verification-horrors

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
A
 
 
A2
 
 
B
 
 
C
 
 
D
 
 
 
 

Etherscan Verification Horrors

Same contract, same compiler version, same-ish config, but different generated bytecode.

Using solc v0.6.7 to compile the contracts. You'll need to have the solc binary in your PATH to compile the contracts.

Directories A, A2, B, C, and D each contain (at its core) an identical piece of contract logic:

contract Contract {
    address public addr;

    function poke() public {
        addr = msg.sender;
    }
}

However, the compiled bytecode for each of them (apart from A and A2, just to show you can have identical builds) is different.

# A
608060405234801561001057600080fd5b50610124806100206000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806318178358146037578063767800de14603f575b600080fd5b603d6087565b005b604560c9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea2646970667358221220f717bb996d5877b34d8676211262a530cda09826b1d42bb9baa3b38c228bea7564736f6c63430006070033

# A2
608060405234801561001057600080fd5b50610124806100206000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806318178358146037578063767800de14603f575b600080fd5b603d6087565b005b604560c9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea2646970667358221220f717bb996d5877b34d8676211262a530cda09826b1d42bb9baa3b38c228bea7564736f6c63430006070033

# B
608060405234801561001057600080fd5b50610124806100206000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806318178358146037578063767800de14603f575b600080fd5b603d6087565b005b604560c9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea264697066735822122072fc3f07931540a1aa05b55a5e0f277082f63622c3268c7e95b9049ec7e820ff64736f6c63430006070033

# C
608060405234801561001057600080fd5b5061015c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063181783581461003b578063767800de14610045575b600080fd5b610043610063565b005b61004d6100a5565b60405161005a91906100d9565b60405180910390f35b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b60006100ff82610106565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff8216905091905056fea26469706673582212201c4eb0802dc39ee7b2c507cf81a7cfac140a38a65de63a082d4788d22072a8ab64736f6c63430006070033

# D
608060405234801561001057600080fd5b5061015c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063181783581461003b578063767800de14610045575b600080fd5b610043610063565b005b61004d6100a5565b60405161005a91906100d9565b60405180910390f35b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b60006100ff82610106565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff8216905091905056fea2646970667358221220d5ee93a819c5abbd03cc8eff12531cb324e5e7648d51fb377150b233b470407c64736f6c63430006070033

Fortunately, the difference in swarm-hashes shouldn't affect contract verification on etherscan.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages