You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to implement a cast command to migrate a contract verification from on explorer to another (specifically from etherscan to blockscout), I encountered the issue that the contract_source_code and submit_contract_verification methods fail when run against blockscout. (more specifically against "https://eth.blockscout.com/api".
Judging from the error messages (see screenshots), the former issue seems to be a pretty strait forward deserialziation issue whereas the latter has a pretty cryptic error message.
The text was updated successfully, but these errors were encountered:
…lockscout (#22)
[Blockscouts](eth.blockscout.com) response upon requesting a contracts
source code diverges from that of etherscan and is thereby incompatible
with the current serde deserialization schema:
1. Use "true" / "false" instead of "1"/"0" for various binary fields
(e.g. "OptimizationUsed")
2. Different naming of certain fields (e.g. "IsProxy" vs. "Proxy")
3. Omitting fields entirely when data would be empty instead of
returning an empty string (e.g. "ConstructorArguments").
For reference compare the
[blockscout](https://eth.blockscout.com/api?module=contract&action=getsourcecode&address=0x00000000219ab540356cBB839Cbe05303d7705Fa)
and
[etherscan](https://api.etherscan.io/api?module=contract&action=getsourcecode&address=0x00000000219ab540356cbb839cbe05303d7705fa)
example response for the ETH deposit contract.
This PR fixes that by adjusting the serde deserialization options
accordingly.
This partially addresses
#21
---------
Co-authored-by: Enrique Ortiz <hi@enriqueortiz.dev>
While trying to implement a
cast
command to migrate a contract verification from on explorer to another (specifically from etherscan to blockscout), I encountered the issue that thecontract_source_code
andsubmit_contract_verification
methods fail when run against blockscout. (more specifically against "https://eth.blockscout.com/api".I created tests reproducing the issue for contract_source_code and submit_contract_verification.
Judging from the error messages (see screenshots), the former issue seems to be a pretty strait forward deserialziation issue whereas the latter has a pretty cryptic error message.
The text was updated successfully, but these errors were encountered: