|
|
|
@ -13,9 +13,8 @@ defmodule Explorer.SmartContract.Verifier do |
|
|
|
|
alias Explorer.SmartContract.Verifier.ConstructorArguments |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_4_23 "a165627a7a72305820" |
|
|
|
|
@metadata_hash_prefix_0_5_10 "a265627a7a72305820" |
|
|
|
|
@metadata_hash_prefix_0_5_11 "a265627a7a72315820" |
|
|
|
|
@metadata_hash_prefix_0_5_16 "a365627a7a72315820" |
|
|
|
|
@metadata_hash_prefix_0_5_family_1 "65627a7a723" |
|
|
|
|
@metadata_hash_prefix_0_5_family_2 "5820" |
|
|
|
|
@metadata_hash_prefix_0_6_0 "a264697066735822" |
|
|
|
|
|
|
|
|
|
@experimental "6c6578706572696d656e74616cf5" |
|
|
|
@ -191,165 +190,68 @@ defmodule Explorer.SmartContract.Verifier do |
|
|
|
|
@metadata_hash_prefix_0_4_23 <> <<metadata_hash::binary-size(64)>> <> "0029" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
# Solidity >= 0.5.9; https://github.com/ethereum/solidity/blob/aa4ee3a1559ebc0354926af962efb3fcc7dc15bd/docs/metadata.rst |
|
|
|
|
@metadata_hash_prefix_0_5_10 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"43" <> <<compiler_version::binary-size(6)>> <> "0032" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_10 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7826" <> <<compiler_version::binary-size(76)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_10 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7827" <> <<compiler_version::binary-size(78)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_10 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7828" <> <<compiler_version::binary-size(80)>> <> "0058" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_10 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7829" <> <<compiler_version::binary-size(82)>> <> "0059" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
# Solidity >= 0.5.11 https://github.com/ethereum/solidity/blob/develop/Changelog.md#0511-2019-08-12 |
|
|
|
|
# Metadata: Update the swarm hash to the current specification, changes bzzr0 to bzzr1 and urls to use bzz-raw:// |
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"43" <> <<compiler_version::binary-size(6)>> <> "0032" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"43" <> <<compiler_version::binary-size(6)>> <> "0032" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7826" <> <<compiler_version::binary-size(76)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7826" <> <<compiler_version::binary-size(76)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7827" <> <<compiler_version::binary-size(78)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7827" <> <<compiler_version::binary-size(78)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7828" <> <<compiler_version::binary-size(80)>> <> "0058" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
# Solidity >= 0.5 family && experimantal |
|
|
|
|
<<_::binary-size(2)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_1 <> |
|
|
|
|
<<_::binary-size(1)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_2 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7828" <> <<compiler_version::binary-size(80)>> <> "0058" <> _constructor_arguments -> |
|
|
|
|
"43" <> <<compiler_version::binary-size(6)>> <> <<_::binary-size(4)>> <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7829" <> <<compiler_version::binary-size(82)>> <> "0059" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
|
<<_::binary-size(2)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_1 <> |
|
|
|
|
<<_::binary-size(1)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_2 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7829" <> <<compiler_version::binary-size(82)>> <> "0059" <> _constructor_arguments -> |
|
|
|
|
<<_::binary-size(4)>> <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
# Solidity >= 0.5.9; https://github.com/ethereum/solidity/blob/aa4ee3a1559ebc0354926af962efb3fcc7dc15bd/docs/metadata.rst |
|
|
|
|
<<_::binary-size(2)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_1 <> |
|
|
|
|
<<_::binary-size(1)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_2 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"43" <> <<compiler_version::binary-size(6)>> <> "0032" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
<<_::binary-size(2)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_1 <> |
|
|
|
|
<<_::binary-size(1)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_2 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"43" <> <<compiler_version::binary-size(6)>> <> "0040" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7826" <> <<compiler_version::binary-size(76)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7826" <> <<compiler_version::binary-size(76)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
<<_::binary-size(2)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_1 <> |
|
|
|
|
<<_::binary-size(1)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_2 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7827" <> <<compiler_version::binary-size(78)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7827" <> <<compiler_version::binary-size(78)>> <> "0057" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
<<_::binary-size(2)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_1 <> |
|
|
|
|
<<_::binary-size(1)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_2 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7828" <> <<compiler_version::binary-size(80)>> <> "0058" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
<<_::binary-size(2)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_1 <> |
|
|
|
|
<<_::binary-size(1)>> <> |
|
|
|
|
@metadata_hash_prefix_0_5_family_2 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7828" <> <<compiler_version::binary-size(80)>> <> "0058" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7829" <> <<compiler_version::binary-size(82)>> <> "0059" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 <> |
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
@experimental <> |
|
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
|
"7829" <> <<compiler_version::binary-size(82)>> <> "0059" <> _constructor_arguments -> |
|
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
|