|
|
@ -15,8 +15,10 @@ defmodule Explorer.SmartContract.Verifier do |
|
|
|
@metadata_hash_prefix_0_4_23 "a165627a7a72305820" |
|
|
|
@metadata_hash_prefix_0_4_23 "a165627a7a72305820" |
|
|
|
@metadata_hash_prefix_0_5_10 "a265627a7a72305820" |
|
|
|
@metadata_hash_prefix_0_5_10 "a265627a7a72305820" |
|
|
|
@metadata_hash_prefix_0_5_11 "a265627a7a72315820" |
|
|
|
@metadata_hash_prefix_0_5_11 "a265627a7a72315820" |
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_16 "a365627a7a72315820" |
|
|
|
@metadata_hash_prefix_0_6_0 "a264697066735822" |
|
|
|
@metadata_hash_prefix_0_6_0 "a264697066735822" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@experimental "6c6578706572696d656e74616cf5" |
|
|
|
@metadata_hash_common_suffix "64736f6c63" |
|
|
|
@metadata_hash_common_suffix "64736f6c63" |
|
|
|
|
|
|
|
|
|
|
|
def evaluate_authenticity(_, %{"name" => ""}), do: {:error, :name} |
|
|
|
def evaluate_authenticity(_, %{"name" => ""}), do: {:error, :name} |
|
|
@ -230,6 +232,20 @@ defmodule Explorer.SmartContract.Verifier do |
|
|
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
<<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 <> |
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
"7826" <> <<compiler_version::binary-size(76)>> <> "0057" <> _constructor_arguments -> |
|
|
|
"7826" <> <<compiler_version::binary-size(76)>> <> "0057" <> _constructor_arguments -> |
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
@ -242,6 +258,20 @@ defmodule Explorer.SmartContract.Verifier do |
|
|
|
|
|
|
|
|
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
@metadata_hash_prefix_0_5_11 <> |
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
<<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 <> |
|
|
|
|
|
|
|
<<metadata_hash::binary-size(64)>> <> |
|
|
|
|
|
|
|
@experimental <> |
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
@metadata_hash_common_suffix <> |
|
|
|
"7828" <> <<compiler_version::binary-size(80)>> <> "0058" <> _constructor_arguments -> |
|
|
|
"7828" <> <<compiler_version::binary-size(80)>> <> "0058" <> _constructor_arguments -> |
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
@ -252,6 +282,78 @@ defmodule Explorer.SmartContract.Verifier do |
|
|
|
"7829" <> <<compiler_version::binary-size(82)>> <> "0059" <> _constructor_arguments -> |
|
|
|
"7829" <> <<compiler_version::binary-size(82)>> <> "0059" <> _constructor_arguments -> |
|
|
|
do_extract_bytecode_and_metadata_hash_output(metadata_hash, extracted, compiler_version) |
|
|
|
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 <> |
|
|
|
|
|
|
|
"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)>> <> |
|
|
|
|
|
|
|
@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 <> |
|
|
|
|
|
|
|
<<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 <> |
|
|
|
|
|
|
|
<<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 <> |
|
|
|
|
|
|
|
<<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 <> |
|
|
|
|
|
|
|
<<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) |
|
|
|
|
|
|
|
|
|
|
|
# Solidity >= 0.6.0 https://github.com/ethereum/solidity/blob/develop/Changelog.md#060-2019-12-17 |
|
|
|
# Solidity >= 0.6.0 https://github.com/ethereum/solidity/blob/develop/Changelog.md#060-2019-12-17 |
|
|
|
# https://github.com/ethereum/solidity/blob/26b700771e9cc9c956f0503a05de69a1be427963/docs/metadata.rst#encoding-of-the-metadata-hash-in-the-bytecode |
|
|
|
# https://github.com/ethereum/solidity/blob/26b700771e9cc9c956f0503a05de69a1be427963/docs/metadata.rst#encoding-of-the-metadata-hash-in-the-bytecode |
|
|
|
# IPFS is used instead of Swarm |
|
|
|
# IPFS is used instead of Swarm |
|
|
|