Skip to content

Commit

Permalink
Python web3 library upgrade to version 7.2.0 fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusWentz committed Sep 4, 2024
1 parent d21ba1d commit e919442
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Scripts/python/Legacy_Tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
}

signed_tx = web3.eth.account.sign_transaction(tx, devTestnetPrivateKey)
print(web3.to_hex(web3.eth.send_raw_transaction(signed_tx.rawTransaction)))
print(web3.to_hex(web3.eth.send_raw_transaction(signed_tx.raw_transaction)))
2 changes: 1 addition & 1 deletion Scripts/python/contractMethodTx.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
print(tx)

signed_tx = web3.eth.account.sign_transaction(tx, devTestnetPrivateKey)
print(web3.to_hex(web3.eth.send_raw_transaction(signed_tx.rawTransaction)))
print(web3.to_hex(web3.eth.send_raw_transaction(signed_tx.raw_transaction)))
4 changes: 2 additions & 2 deletions Scripts/python/contractRawDataTx.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
'chainId': web3.eth.chain_id,
'nonce': web3.eth.get_transaction_count(userWallet),
'to': Contract_At_Address,
'data': contract_Call.encodeABI(fn_name='set', args=[currentUnixTime]),
'data': contract_Call.encode_abi(abi_element_identifier='set', args=[currentUnixTime]),
'gas': 30000,
'gasPrice': web3.eth.gas_price # https://etherscan.io/gastracker
}

signed_tx = web3.eth.account.sign_transaction(tx, devTestnetPrivateKey)
print(web3.to_hex(web3.eth.send_raw_transaction(signed_tx.rawTransaction)))
print(web3.to_hex(web3.eth.send_raw_transaction(signed_tx.raw_transaction)))

0 comments on commit e919442

Please sign in to comment.