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

Expose past redemption requested events getter #677

Merged
merged 3 commits into from
Aug 2, 2023

Conversation

lukasz-zimnoch
Copy link
Member

Refs: keep-network/keep-core#3664

Here we expose the Bridge.getRedemptionRequestedEvents method that allows fetching past redemption requested events from the Bridge contract.

Here we expose the `Bridge.getRedemptionRequestedEvents` method that allows
fetching past redemption requested events from the `Bridge` contract.
Copy link
Contributor

@r-czajkowski r-czajkowski left a 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.

Comment on lines +775 to +779
const events: EthersEvent[] = await this.getEvents(
"RedemptionRequested",
options,
...filterArgs
)
Copy link
Contributor

@r-czajkowski r-czajkowski Aug 2, 2023

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.

Copy link
Member Author

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!

@r-czajkowski r-czajkowski merged commit 9ca1370 into main Aug 2, 2023
38 checks passed
@r-czajkowski r-czajkowski deleted the get-redemption-requested-events branch August 2, 2023 12:15
pdyraga added a commit that referenced this pull request Aug 3, 2023
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.
@lukasz-zimnoch lukasz-zimnoch added this to the typescript/v1.4.0 milestone Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔌 typescript TypeScript library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants