Hot answers tagged

1

try w3 = Web3(Web3.HTTPProvider('http://127.0.0.1:7545')) Also, make sure that the port is correct (usually ganache-cli listen on 8545) Source: web3.py quickstart


1

transact() asks the node to sign your transaction using eth_sendTransaction. Infura can't do that, because they don't have your keys. Instead, you can use the contract object to create an unsigned transaction like: contract_call = contract.functions.transfer(destination_address, value) unsigned_txn = contract_call.buildTransaction({'chainId': 1, 'gasPrice': ...


Only top voted, non community-wiki answers of a minimum length are eligible