Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Getting error when decoding event with indexed fields. #30

Open
coinsandsteeldev opened this issue May 13, 2018 · 9 comments
Open

Getting error when decoding event with indexed fields. #30

coinsandsteeldev opened this issue May 13, 2018 · 9 comments

Comments

@coinsandsteeldev
Copy link

coinsandsteeldev commented May 13, 2018

Hi! I'm using Ganache 1.0.1 and ethjs 0.4.0.
Here how i use watcher:

this.FightFinished = Contracts.zoneContract.FightFinished(
  { toBlock: 'latest', player: Client.activeAccount }
)
this.FightFinished.new()
this.FightFinished.watch(r => {  
})

I believe this was outlined at https://github.com/ethjs/ethjs-abi/issues/15
But no response at all, i'll try get response here instead.

Log from watch:

Error: [ethjs-filter] while decoding filter change event data from RPC '[{"logIndex":"2","transactionIndex":"0","transactionHash":"0x2823403d01f35e4d04a2316c72c9a9906160cafa447099644c6af0c48c18261e","blockHash":"0x745dd38108efe3469825dcbc9986a27717ccee25c95cae8cb338886eb73aa639","blockNumber":"92","address":"0xb57e97e510c60673412307547142e7492cd2cb1f","data":"0x0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002","topics":["0x79b7b95e80b1a19a31c1a9cdfdbc01f323ac30aef005dd716b3474f8d4b72c68","0x000000000000000000000000e91d5216f69648ce919442e2c426cf48738f4101"],"type":"mined"}]': TypeError: Cannot read property 'slice' of undefined

@SilentCicero
Copy link
Member

SilentCicero commented May 13, 2018 via email

@coinsandsteeldev
Copy link
Author

Thanks, would be awesome, this problem doesn't allow to continue some parts of development.

@SilentCicero
Copy link
Member

SilentCicero commented May 14, 2018 via email

@coinsandsteeldev
Copy link
Author

No, i will try

@coinsandsteeldev
Copy link
Author

Yes, it worked!

@SilentCicero
Copy link
Member

SilentCicero commented May 14, 2018 via email

@coinsandsteeldev
Copy link
Author

That is great, but how to listen for new Logs?

@coinsandsteeldev
Copy link
Author

@SilentCicero

@SilentCicero
Copy link
Member

SilentCicero commented May 16, 2018 via email

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

No branches or pull requests

2 participants