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

returnValues doesn't exist on event object #2265

Closed
sydneyitguy opened this issue Jan 29, 2019 · 4 comments · Fixed by #2348
Closed

returnValues doesn't exist on event object #2265

sydneyitguy opened this issue Jan 29, 2019 · 4 comments · Fixed by #2348
Labels
Bug Addressing a bug

Comments

@sydneyitguy
Copy link

Steps to reproduce

contract.events.Transfer({ fromBlock: 4910000 }, function(error, event) {
   console.log(event);
});

Expected behavior

The event object should have returnValues property like the example on the document (https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#id38)

{
    returnValues: {
        myIndexedParam: 20,
        myOtherIndexedParam: '0x123456789...',
        myNonIndexParam: 'My String'
    },
    raw: {
        data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
        topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']
    },
    event: 'MyEvent',
    signature: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
    logIndex: 0,
    transactionIndex: 0,
    transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
    blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
    blockNumber: 1234,
    address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
}

Actual behavior

Output doesn't have returnValues property at all.

{ address: '0xfbE807500852575a654d52d97ccEd6096A2696CD',
  blockHash:
   '0x70ed10054cd982d5dd02065522dc47854fb51640cae021397ce772e8ee3c1d56',
  blockNumber: 4917830,
  data:
   '0x0000000000000000000000000000000000000000019d971e4fe8401e74000000',
  logIndex: 6,
  removed: false,
  topics:
   [ '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
     '0x0000000000000000000000000000000000000000000000000000000000000000',
     '0x000000000000000000000000b62f43623680eeb3d6fd7a8ede0814940b7da8cf' ],
  transactionHash:
   '0x42553eab3955aca45385cb6527be37fbe146ab871698252834465a55e8ceee6e',
  transactionIndex: 7,
  id:
   'log_0x6c3261cc661ff438b254a47a9fbed035b474a232ccbd498bd2477fe38d3abeea' }

Versions

NPM: 6.7.0
Node: 11.7.0
Web3.js: 1.0.0-beta.41
OS: Mac OS 10.14.2

@sydneyitguy sydneyitguy changed the title returnValues doesn't exists on event object returnValues doesn't exist on event object Jan 29, 2019
@nivida
Copy link
Contributor

nivida commented Jan 31, 2019

Closed it because of this issue: #2268

@nivida nivida closed this as completed Jan 31, 2019
@sydneyitguy
Copy link
Author

@nivida
It seems #2268 is merged on 1.0.0-beta.42 version, but I just tested it again on 1.0.0-beta.43 and it still doesn't decode returnValues properly (Exactly same results I described on this ticket).

Maybe it's a different issue?

@nivida
Copy link
Contributor

nivida commented Feb 8, 2019

Thanks for pointing this out I will have a closer look at it today.

@nivida nivida reopened this Feb 8, 2019
@nivida nivida added the Bug Addressing a bug label Feb 8, 2019
@sydneyitguy
Copy link
Author

@nivida
Sorry but I just tested beta.44 version that says including this issue fix, but problem still the same on my side.

I guess it's could probably be..
#2348 says returnValues was missing on "past logs", but my issue is for contract.events.Transfer method (websocket subscription), not the getPastEvents function.

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

Successfully merging a pull request may close this issue.

2 participants