请在任何示例中如何使用web3 py中的私有密钥调用合同方法(写),本地化
我正在尝试这样做
contract = web3.eth.contract(address=address, abi=abi)
transaction_dict = contract.functions.withdraw(10).buildTransaction({
'nonce': web3.eth.getTransactionCount(address_user) + 1,
'from': address_user,
'gas': 8003929,
'gasPrice': 18000000000,
'chainId': 10
})
signed = web3.eth.account.signTransaction(transaction_dict, private_key)
web3.eth.sendRawTransaction(signed.rawTransaction)
并得到错误消息:ValueError:{'code':-32000,'message':'超出了限制气体限制'}