Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Fix error caused by querying non-standard ERC20 contracts without Decimal #97

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

okeyzero
Copy link

Fix error caused by querying non-standard ERC20 contracts without Decimal function

Error: (code: -32000, message: contract creation code storage out of gas, data: e.g. 0xc0ca776fe52)

Example: 0xc0ca776fe52eC92b1D5603cAadf148DbD8C22a80

Limit the gas limit of the call, 20000 is already enough for normal contract calls.

The 20000 limit was a random thought, because I tested that 5000 would affect the normal token lookup, so I set it a bit bigger.
However, I don't understand why you don't use try catch, maybe it's better that way, maybe I didn't think about it in some places.

Fix error caused by querying non-standard ERC20 contracts without Dec…imal function

Error: (code: -32000, message: contract creation code storage out of gas, data: e.g. 0xc0ca776fe52)
Example: 0xc0ca776fe52eC92b1D5603cAadf148DbD8C22a80
add json
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant