【发布时间】:2021-11-27 19:49:45
【问题描述】:
我正在使用以下代码进行 web3py 合约交易:
txn = contract.functions.bid(
tokenId,
price
).buildTransaction({
'chainId': 56,
'gas': gasLimit,
'gasPrice': web3.toWei('5', 'gwei'),
'nonce': nonce
})
signed_txn = web3.eth.account.sign_transaction(txn, private_key=privateKey)
web3.eth.sendRawTransaction(web3.toHex(signed_txn.rawTransaction))
交易在 05:54:42 出现在 Bscscan 上,但 sendRawTransaction 出现在 05:54:39(相差 3 秒)。有没有可能把这个时间差减到最小?
【问题讨论】:
标签: python blockchain web3 web3py bscscan