Skip to content

Instantly share code, notes, and snippets.

@traderbagel
Created September 4, 2018 10:54
Show Gist options
  • Save traderbagel/3ec444a1f5b2cb04aecd7432c9640a19 to your computer and use it in GitHub Desktop.
Save traderbagel/3ec444a1f5b2cb04aecd7432c9640a19 to your computer and use it in GitHub Desktop.
web3_query_transaction_with_logs.py
>>> web3.eth.getTransactionReceipt('0xba48fc0e658bfd927370ae0dda6fd37793e504e90289cd8216e986ebf714699b')
AttributeDict({
'blockHash': HexBytes('0xf16ea2ee219d8ae91ce7dae021cfd9a5a9e959bd85d78b74be1ca4444e994a81'),
'blockNumber': 6259346,
'contractAddress': None,
'cumulativeGasUsed': 7095293,
'from': '0x98702707fe04c38ce752afad9c392f4a46289274',
'gasUsed': 22514,
'logs': [AttributeDict({
'address': '0xB8c77482e45F1F44dE1745F52C74426C631bDD52',
'blockHash': HexBytes('0xf16ea2ee219d8ae91ce7dae021cfd9a5a9e959bd85d78b74be1ca4444e994a81'),
'blockNumber': 6259346,
'data': '0x00000000000000000000000000000000000000000000000075f610f70ed20000',
'logIndex': 88,
'removed': False,
'topics': [HexBytes('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'),
HexBytes('0x00000000000000000000000098702707fe04c38ce752afad9c392f4a46289274'),
HexBytes('0x0000000000000000000000003f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be')],
'transactionHash': HexBytes('0xba48fc0e658bfd927370ae0dda6fd37793e504e90289cd8216e986ebf714699b'),
'transactionIndex': 60})
],
'logsBloom': HexBytes('0x00000000000000004000000000000000000000000000000000000080000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000004000000400000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000002000000000000000000000000000000000200000000000000000000000100000000000'),
'status': 1,
'to': '0xb8c77482e45f1f44de1745f52c74426c631bdd52',
'transactionHash': HexBytes('0xba48fc0e658bfd927370ae0dda6fd37793e504e90289cd8216e986ebf714699b'),
'transactionIndex': 60
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment