slove sendRawTransaction(**)'s same nonce problem

Words
29
Reading
1 min
Listen
Play
8y

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

slove sendRawTransaction(**)'s same nonce problem | Ecency