How to solve checksum issue on Web3.py? #30
Unanswered
imcrazysteven
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Hi @dodger213 You know, ethereum addresses are case-insensitive at the protocol level but checksum-sensitive in libraries like web3.py w3 = Web3(Web3.HTTPProvider(rpc_url))
checksum_address = w3.to_checksum_address(address.lower())
code = w3.eth.get_code(checksum_address)Hope you can solve this issue with the above code. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi mates.
Recently I have faced some issues using token contract address in web3.py.
This is PANICAN token address(0xa50ad00ce16fe2b0aabbb2db0ddf5590ff5769ff) in gmgn.ai and this one is checksummed token contract address in etherscan(0xa50AD00ce16fE2B0AABbb2dB0ddf5590FF5769fF)
The issue is wbe3.py cannot use the address in gmgn.ai, and only accepts checksummed address.
How to solve this problem?
Thank you in advance,.
Beta Was this translation helpful? Give feedback.
All reactions