Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token contract hash: <0xxxx> error while fetching metadata: #5121

Closed
thomas59553 opened this issue Jan 20, 2022 · 7 comments · Fixed by #5184
Closed

Token contract hash: <0xxxx> error while fetching metadata: #5121

thomas59553 opened this issue Jan 20, 2022 · 7 comments · Fixed by #5184
Labels
waiting on feedback Waiting for original opener to respond if bug is fixed

Comments

@thomas59553
Copy link

thomas59553 commented Jan 20, 2022

Tokens not visible in token list

log

05:12:48.840 [debug] <Token contract hash: 0x4dfae97e6da2faac2fd2be422212ae2f7b91f825> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 2
05:12:48.842 [debug] <Token contract hash: 0x4dfae97e6da2faac2fd2be422212ae2f7b91f825> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 1
05:12:48.844 [debug] <Token contract hash: 0x4dfae97e6da2faac2fd2be422212ae2f7b91f825> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 0
05:14:06.514 [debug] <Token contract hash: 0x937a95ff6e51c94b90b9b7c6cd4756dd6fc16f95> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 2
05:14:06.516 [debug] <Token contract hash: 0x937a95ff6e51c94b90b9b7c6cd4756dd6fc16f95> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 1
05:14:06.517 [debug] <Token contract hash: 0x937a95ff6e51c94b90b9b7c6cd4756dd6fc16f95> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 0
05:38:12.650 [debug] <Token contract hash: 0x5c89779dcd70ab86d731eccb42b424d3be7ae0b0> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 2
05:38:12.652 [debug] <Token contract hash: 0x5c89779dcd70ab86d731eccb42b424d3be7ae0b0> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 1
05:38:12.654 [debug] <Token contract hash: 0x5c89779dcd70ab86d731eccb42b424d3be7ae0b0> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 0
09:14:10.582 [debug] <Token contract hash: 0xe62583bfac0d644774890a319680a6ee1262a137> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 2
09:14:10.606 [debug] <Token contract hash: 0xe62583bfac0d644774890a319680a6ee1262a137> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 1
09:14:10.613 [debug] <Token contract hash: 0xe62583bfac0d644774890a319680a6ee1262a137> error while fetching metadata:
function: 06fdde03 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 313ce567 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
function: 95d89b41 - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 0
09:14:19.263 [debug] <Token contract hash: 0xe62583bfac0d644774890a319680a6ee1262a137> error while fetching metadata:
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 2
09:14:19.264 [debug] <Token contract hash: 0xe62583bfac0d644774890a319680a6ee1262a137> error while fetching metadata:
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 1
09:14:19.265 [debug] <Token contract hash: 0xe62583bfac0d644774890a319680a6ee1262a137> error while fetching metadata:
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 0
17:28:32.781 [debug] <Token contract hash: 0x937A95FF6E51C94B90B9B7C6CD4756DD6FC16F95> error while fetching metadata:
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 2
17:28:32.784 [debug] <Token contract hash: 0x937A95FF6E51C94B90B9B7C6CD4756DD6FC16F95> error while fetching metadata:
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 1
17:28:32.786 [debug] <Token contract hash: 0x937A95FF6E51C94B90B9B7C6CD4756DD6FC16F95> error while fetching metadata:
function: 18160ddd - error: (-32602) invalid argument 0: json: cannot unmarshal non-string into Go struct field CallArgs.from of type common.Address
Retries left: 0

Environment

  • Elixir & Erlang/OTP versions (elixir -12):
  • Operating System: ubuntu 20
  • Blockscout Version/branch: 4.1.1 beta

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

show tokens, and good record in database

Actual behaviour

name | symbol | total_supply | decimals missing in table tokens

@vbaranov
Copy link
Member

@thomas59553 it looks like Blockscout was not able to read public getters of those contracts like name, symbol, etc. For instance, what is the response for this request on your archive node:

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to": "0x4dfae97e6da2faac2fd2be422212ae2f7b91f825", "data": "0x06fdde03"}],"id":1}' https://endpoint.of.the.archive.node

@vbaranov vbaranov added the waiting on feedback Waiting for original opener to respond if bug is fixed label Jan 27, 2022
@thomas59553
Copy link
Author

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to": "0x4dfae97e6da2faac2fd2be422212ae2f7b91f825", "data": "0x06fdde03"}],"id":1}' https://192.168.1.10:8541
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to": "0x4dfae97e6da2faac2fd2be422212ae2f7b91f825", "data": "0x06fdde03"}],"id":1}' http://192.168.1.10:8541
bad method

curl -X POST --url http://192.168.1.10:8540/ --header 'content-type: application/json' --data '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f722c54"],"id":2}'
{"jsonrpc":"2.0","id":2,"result":"0x81a298d292319331e0137d1b32f2cc36c74f79b2b44a0a76ca055548b2717cda"}

curl -X POST --url http://192.168.1.10:8540/ --header 'content-type: application/json' --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to": "0x4dfae97e6da2faac2fd2be422212ae2f7b91f825", "data": "0x06fdde03"}],"id":1}'
{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"missing value for required argument 1"}}

curl -X POST --url http://192.168.1.10:8540/ --header 'content-type: application/json' --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to": "0x4dfae97e6da2faac2fd2be422212ae2f7b91f825", "data": "0x06fdde03"},"latest"],"id":1}'
{"jsonrpc":"2.0","id":1,"result":"0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000054166726978000000000000000000000000000000000000000000000000000000"}

curl -X POST --url http://192.168.1.10:8540/ --header 'content-type: application/json' --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to": "0x4dfae97e6da2faac2fd2be422212ae2f7b91f825", "data": "0x18160ddd"},"latest"],"id":1}'
{"jsonrpc":"2.0","id":1,"result":"0x0000000000000000000000000000000000000000027cedd7a40462be42000000"}

curl -X POST --url http://192.168.1.10:8540/ --header 'content-type: application/json' --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to": "0x4dfae97e6da2faac2fd2be422212ae2f7b91f825", "data": "0x95d89b41"},"latest"],"id":1}'
{"jsonrpc":"2.0","id":1,"result":"0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000034146580000000000000000000000000000000000000000000000000000000000"}

@vbaranov
Copy link
Member

vbaranov commented Feb 9, 2022

The issue is rather in the bad responses for public getters of the tokens from the node. I am closing this issue.

@vbaranov vbaranov closed this as completed Feb 9, 2022
@thomas59553
Copy link
Author

helllo i dont understand your answer, i need add ,"latest" to work good, where can i add it in the code ?

@vbaranov vbaranov reopened this Feb 10, 2022
@vbaranov
Copy link
Member

Ah, I see now. I didn't notice, that it worked with latest param. We'll try to fix it on our end.

@vbaranov
Copy link
Member

@thomas59553 can you try to apply a fix from this PR #5184 on your instance and give me feedback? Actually, latest tag is added to all requests if block number is null. Most likely, from: nil param is causing the problem while requesting from your archive node. I added cutting of from param from request if it is null.

@thomas59553
Copy link
Author

Hello Good it's working now, i see the tokens !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting on feedback Waiting for original opener to respond if bug is fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants