slove sendRawTransaction(**)'s same nonce problem

in #python37 years ago

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

Sort:  

Congratulations @wanghuangang! You received a personal award!

1 Year on Steemit

Click here to view your Board of Honor

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @wanghuangang! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!