Hi,
I’m trying to interact with the TrustUSD token contract using web3.py. My code is as follows:
from ethtoken.abi import EIP20_ABI
from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ropsten.infura.io/v3/<project_id>"))
tusd_address = "0x0000000000085d4780B73119b644AE5ecd22b376" # as listed here: https://github.com/trusttoken/smart-contracts
contract = w3.eth.contract(address=tusd_address, abi=EIP20_ABI)
contract.functions.decimals().call()
but I’m receiving the following error:
BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?
Obviously, I’m missing something, but not a clue of what’s going on. Any help here guys?
Thanks in advance.