|
|
@ -244,8 +244,18 @@ defmodule Explorer.SmartContract.Verifier.ConstructorArguments do |
|
|
|
metadata_hash_prefix |
|
|
|
metadata_hash_prefix |
|
|
|
) do |
|
|
|
) do |
|
|
|
if is_constructor_arguments_still_has_metadata_prefix(constructor_arguments, metadata_hash_prefix) do |
|
|
|
if is_constructor_arguments_still_has_metadata_prefix(constructor_arguments, metadata_hash_prefix) do |
|
|
|
<<_::binary-size(2)>> <> rest = constructor_arguments |
|
|
|
{ind, _} = :binary.match(constructor_arguments, metadata_hash_prefix) |
|
|
|
extract_constructor_arguments(rest, check_func, contract_source_code, contract_name) |
|
|
|
offset = if ind > 2, do: ind - 2, else: 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
processed_constructor_arguments = |
|
|
|
|
|
|
|
if offset > 0 do |
|
|
|
|
|
|
|
<<_::binary-size(offset)>> <> rest = constructor_arguments |
|
|
|
|
|
|
|
rest |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
constructor_arguments |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extract_constructor_arguments(processed_constructor_arguments, check_func, contract_source_code, contract_name) |
|
|
|
else |
|
|
|
else |
|
|
|
extract_constructor_arguments_check_func( |
|
|
|
extract_constructor_arguments_check_func( |
|
|
|
constructor_arguments, |
|
|
|
constructor_arguments, |
|
|
|