Could you tell me please, how i can call function in contract https://bscscan.com/address/0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F#readContract?
I use python
def str_to_addr(s: str):
if s.startswith("0x"):
return Address(bytes.fromhex(s[2:]))
elif s.endswith(".eth"):
return ENS(s)
w3 = Web3(Web3.HTTPProvider('https://mainnet.infura.io/v3/....'))
router_address = str_to_addr("0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F")
router = w3.eth.contract(address=router_address, abi=abi)
print(router.functions.factory().call())
But i get error web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?
What i should do?