Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return events on sendTransaction #1377

Closed
naumenkogs opened this issue Feb 14, 2018 · 2 comments
Closed

Return events on sendTransaction #1377

naumenkogs opened this issue Feb 14, 2018 · 2 comments
Assignees
Labels
Enhancement Includes improvements or optimizations

Comments

@naumenkogs
Copy link

Is there a way to obtain generated events on sendTransaction call (in the same way I get it from contract.methods.method_name.send())?

This could be useful to observe events on deferred transactions (since I can't use regular send() on contract in this case) or when transfer goes through a fallback payable function (for example token minting generates events)?

That's what I'm getting now as a result from sendTransaction:

{ transactionHash: '0xee0a4aa8aba9f8ceae4ba21e6d73190b093ee6671bcb1992cff1aeefd414c6e2',
  transactionIndex: 0,
  blockHash: '0xc956e5b6b87e255d462ad8a49619051f2227a97c486ad3e0fc52b119f8f46d60',
  blockNumber: 346,
  gasUsed: 99616,
  cumulativeGasUsed: 99616,
  contractAddress: null,
  logs:
   [ { logIndex: 0,
       transactionIndex: 0,
       transactionHash: '0xee0a4aa8aba9f8ceae4ba21e6d73190b093ee6671bcb1992cff1aeefd414c6e2',
       blockHash: '0xc956e5b6b87e255d462ad8a49619051f2227a97c486ad3e0fc52b119f8f46d60',
       blockNumber: 346,
       address: '0xa9FBC415b2969f3B65F2021F76F422ba82c9A062',
       data: '0x0000000000000000000000000000000000000000000000000000000000000001',
       topics: [Array],
       type: 'mined',
       id: 'log_eca044e4' },
     { logIndex: 1,
       transactionIndex: 0,
       transactionHash: '0xee0a4aa8aba9f8ceae4ba21e6d73190b093ee6671bcb1992cff1aeefd414c6e2',
       blockHash: '0xc956e5b6b87e255d462ad8a49619051f2227a97c486ad3e0fc52b119f8f46d60',
       blockNumber: 346,
       address: '0xa9FBC415b2969f3B65F2021F76F422ba82c9A062',
       data: '0x00000000000000000000000000000000000000000000003635c9adc5dea00000',
       topics: [Array],
       type: 'mined',
       id: 'log_c18ea743' },
     { logIndex: 2,
       transactionIndex: 0,
       transactionHash: '0xee0a4aa8aba9f8ceae4ba21e6d73190b093ee6671bcb1992cff1aeefd414c6e2',
       blockHash: '0xc956e5b6b87e255d462ad8a49619051f2227a97c486ad3e0fc52b119f8f46d60',
       blockNumber: 346,
       address: '0x83BaB5D9066F354daA49a0C435b1bCD8AD5f1462',
       data: '0x0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000003635c9adc5dea00000',
       topics: [Array],
       type: 'mined',
       id: 'log_ba247c28' } ],
  status: 1 }
@nivida nivida self-assigned this Aug 9, 2018
@nivida nivida added the Enhancement Includes improvements or optimizations label Aug 9, 2018
@nivida
Copy link
Contributor

nivida commented Nov 29, 2018

This should be implemented when the PR #2000 is merged and released.

@nivida
Copy link
Contributor

nivida commented Apr 2, 2019

Sorry I didn't see that you were meaning the eth.sendTransaction. Sadly, this isn't possible. Just use the contract methods if you would like to have these events decoded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Includes improvements or optimizations
Projects
None yet
Development

No branches or pull requests

2 participants