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
If contract is not verified and we use getsource method, etherscan returns following json
{"status":"1","message":"OK","result":[{"SourceCode":"","ABI":"Contract source code not verified","ContractName":"","CompilerVersion":"","OptimizationUsed":"","Runs":"","ConstructorArguments":"","EVMVersion":"Default","Library":"","LicenseType":"Unknown","Proxy":"0","Implementation":"","SwarmSource":"","SimilarMatch":""}]}
but etherscan-api could not decode it, and fails with an error
json unmarshal outcome: json: invalid use of ,string struct tag, trying to unmarshal "" into int
I think it happens due to following code
type ContractSource struct {
....
OptimizationUsed int json:"OptimizationUsed,string"
Runs int json:"Runs,string"
...
}
The text was updated successfully, but these errors were encountered:
If contract is not verified and we use getsource method, etherscan returns following json
{"status":"1","message":"OK","result":[{"SourceCode":"","ABI":"Contract source code not verified","ContractName":"","CompilerVersion":"","OptimizationUsed":"","Runs":"","ConstructorArguments":"","EVMVersion":"Default","Library":"","LicenseType":"Unknown","Proxy":"0","Implementation":"","SwarmSource":"","SimilarMatch":""}]}
but etherscan-api could not decode it, and fails with an error
json unmarshal outcome: json: invalid use of ,string struct tag, trying to unmarshal "" into int
I think it happens due to following code
type ContractSource struct {
....
OptimizationUsed int
json:"OptimizationUsed,string"
Runs int
json:"Runs,string"
...
}
The text was updated successfully, but these errors were encountered: