Last active
June 9, 2020 20:29
-
-
Save kdembler/a65d7cbed71608c6188bc5f54e5e26c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from eth_account._utils.transactions import serializable_unsigned_transaction_from_dict | |
from web3 import Web3 | |
transaction = { | |
'to': Web3.toChecksumAddress('0x4d6bb4ed029b33cf25d0810b029bd8b1a6bcab7b'), | |
'gas': 21000, | |
'gasPrice': 10000000000, | |
'nonce': 1, | |
'value': 1, | |
} | |
serializable_transaction = serializable_unsigned_transaction_from_dict(transaction) | |
transaction_hash = serializable_transaction.hash() | |
print(transaction_hash.hex()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment