Hi,
I'm trying to find out the symbol of the token that pays the fees for the network I'm currently in with python+web3. (https://stackoverflow.com/questions/69765460/how-do-you-get-the-network-symbol-in-pythonweb3)
Basically on ERC20 it should say "ETH" on BSC it should be "BNB".
For tokens I can get it from their contract using: tokenContract.functions.symbol().call()
But how do I find out which is the contract the network uses for fees?

Nov 3, 2021, 1:21 PM
Doesnt exist on chain
You can check for the ChainID BSC for example has 56, ETH has 1
Nov 3, 2021, 1:35 PM
Found that solution but I thought I could get it in a more direct manner which I didn't know. So I'll have to map them out and "presume" the token instead of querying the info.
Nov 3, 2021, 1:35 PM
For example, make an enum
Nov 3, 2021, 1:36 PM
Thank you.
Nov 3, 2021, 1:38 PM

© 2024 Draquery.com All rights reserved.