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

Sending confidential transaction returns different event key in the transaction receipt. #68

Open
armaniferrante opened this issue Nov 6, 2018 · 2 comments

Comments

@armaniferrante
Copy link
Contributor

armaniferrante commented Nov 6, 2018

The following returns a different receipt for confidential vs non-confidential:
let receipt = await instance.methods.transfer(accounts[1], amount).send();

For confidential we get for receipt.events

{ '0': 
   { address: '0x4e18C408a1b9229Ddd4b900E279eDFF256907B1e',
     blockHash: '0x818213a9aacb72830e9f40057edd45567a0074d05714721a3ab89bb02675a94e',
     blockNumber: 148183,
     logIndex: 0,
     transactionHash: '0x1c1d38fa9cc2d4986f850ec07ede70f6765e35aca4b5e96186e3d60fa6346b69',
     transactionIndex: 0,
     transactionLogIndex: '0x0',
     type: 'mined',
     id: 'log_5af471ac',
     returnValues: Result {},
     event: undefined,
     signature: '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
     raw: 
      { data: '0x0000000000000000000000000000000000000000000000000000000000000014',
        topics: [Array] } } }

For non-confidential, the key is not 0, but instead, Transfer, which is the name of the event.

@armaniferrante armaniferrante changed the title Sending transaction potentially returns wrong key in receipt Sending confidential transaction returns different event key in the transaction receipt. Nov 6, 2018
@willscott
Copy link
Contributor

is this an issue with the web3c library?

I guess the issue is that the name of the event Transfer is meant to be confidential, so we should expect a response we can decrypt / map back to the actual type

@armaniferrante
Copy link
Contributor Author

As discussed elsewhere, the issue might need a runtime change as well, sending back the encrypted event type.

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

No branches or pull requests

2 participants