slove sendRawTransaction(**)'s same nonce problem

use python3,web3.py

follow code:
for k,v in self.web3.txpool.inspect.pending.items():
if str(k).lower() == fromwho.lower():
noncenum = len(v)
break

tx = Transaction(nonce=(self.web3.eth.getTransactionCount(fromwho) noncenum),gasprice=self.web3.eth.gasPrice,to=self.contract_address,startgas=70000,
value=0,
data = datahex)

Now you can Batch sendRawTransaction

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center