-
Notifications
You must be signed in to change notification settings - Fork 36
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
Expose past redemption requested events getter #677
Conversation
Here we expose the `Bridge.getRedemptionRequestedEvents` method that allows fetching past redemption requested events from the `Bridge` contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM! Left one comment to take a look before the merge.
const events: EthersEvent[] = await this.getEvents( | ||
"RedemptionRequested", | ||
options, | ||
...filterArgs | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably won't work if we want to filter events by the indexed walletPubKeyHash
param. See ethers-io/ethers.js#4244 - I ran into this issue in T daap with ethers v5.4.7
. Here we use v5.5.2
but I think this problem still exists in this version. As a workaround, you can take a look at this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a note about that: cce9d9c. Thanks!
Refs: keep-network/keep-core#3664 Depends on: #677 This changeset adds redemptions to the monitoring system. Specifically, two new system events are supported now: ### Redemption requested An **informational system event** indicating that a new redemption was requested from the on-chain Bridge contract. This event is directly sent to Discord as a notification that does not require any action. ### Large redemption requested A **warning system event** indicating that a large redemption was requested from the on-chain Bridge contract. This event is sent to Sentry hub and should get team’s attention. The default action is making sure that the redemption is not a result of a malicious action, and if not, that the redemption is handled correctly by the system.
Refs: keep-network/keep-core#3664
Here we expose the
Bridge.getRedemptionRequestedEvents
method that allows fetching past redemption requested events from theBridge
contract.