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

KernelProxy: emit SetApp event on construction #466

Merged
merged 2 commits into from
Dec 14, 2018
Merged

Conversation

sohkai
Copy link
Contributor

@sohkai sohkai commented Nov 27, 2018

Fixes #457 by allowing a frontend to follow all SetApp() events emitted from the start of a KernelProxy's lifespan.

@sohkai sohkai requested review from izqui and bingen November 27, 2018 00:04
@coveralls
Copy link

coveralls commented Nov 27, 2018

Coverage Status

Coverage increased (+0.002%) to 98.762% when pulling dc7482a on kernel-emit-setapp into e4e3beb on dev.

@izqui izqui closed this Dec 10, 2018
@izqui izqui reopened this Dec 10, 2018
Copy link
Contributor

@bingen bingen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

const abi = require('web3-eth-abi')

module.exports = {
decodeEventsOfType: (receipt, eventAbi) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is really nice! Way better than what I was doing here. I wonder if we could put it under @aragon/test-helpers or some other place which makes it easy for reuse.
I also think it may be nice to add a wrapper with abi.filter(abi => abi.name === eventName && abi.type === 'event')[0], so just passing the receipt, the global abi and the event name is enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes... we should migrate to @aragon/test-helpers :D.

Will change the API to take in the abi too.

@sohkai sohkai merged commit da862e2 into dev Dec 14, 2018
@sohkai sohkai deleted the kernel-emit-setapp branch December 14, 2018 17:18
@bingen bingen mentioned this pull request Feb 13, 2019
sohkai added a commit that referenced this pull request Mar 8, 2019
Allows a frontend to follow all `SetApp()` events emitted from the start of a KernelProxy's lifespan.
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

Successfully merging this pull request may close these issues.

4 participants