|
|
@ -1938,7 +1938,8 @@ defmodule Explorer.Chain do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
defp check_and_update_constructor_args( |
|
|
|
defp check_and_update_constructor_args( |
|
|
|
%SmartContract{address_hash: address_hash, constructor_arguments: nil} = smart_contract |
|
|
|
%SmartContract{address_hash: address_hash, constructor_arguments: nil, verified_via_sourcify: true} = |
|
|
|
|
|
|
|
smart_contract |
|
|
|
) do |
|
|
|
) do |
|
|
|
if args = Verifier.parse_constructor_arguments_for_sourcify_contract(address_hash, smart_contract.abi) do |
|
|
|
if args = Verifier.parse_constructor_arguments_for_sourcify_contract(address_hash, smart_contract.abi) do |
|
|
|
smart_contract |> SmartContract.changeset(%{constructor_arguments: args}) |> Repo.update() |
|
|
|
smart_contract |> SmartContract.changeset(%{constructor_arguments: args}) |> Repo.update() |
|
|
@ -1952,7 +1953,7 @@ defmodule Explorer.Chain do |
|
|
|
%Address{ |
|
|
|
%Address{ |
|
|
|
hash: address_hash, |
|
|
|
hash: address_hash, |
|
|
|
contract_code: deployed_bytecode, |
|
|
|
contract_code: deployed_bytecode, |
|
|
|
smart_contract: %SmartContract{constructor_arguments: nil} = smart_contract |
|
|
|
smart_contract: %SmartContract{constructor_arguments: nil, verified_via_sourcify: true} = smart_contract |
|
|
|
} = address |
|
|
|
} = address |
|
|
|
) do |
|
|
|
) do |
|
|
|
if args = |
|
|
|
if args = |
|
|
|