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
feat: escrow detector class #773
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
requested review from
benjlevesque,
bertux,
leoslr and
yomarion
February 14, 2022 12:23
benjlevesque
changed the title
feat: Ivo escrow detector class
feat: escrow detector class
Feb 14, 2022
bertux
suggested changes
Feb 22, 2022
benjlevesque
requested changes
Feb 23, 2022
packages/integration-test/test/scheduled/erc20-fee-proxy.test.ts
Outdated
Show resolved
Hide resolved
… retrievers and payment detectors
benjlevesque
approved these changes
Mar 10, 2022
bertux
approved these changes
Mar 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Detection of Escrow events from the graph
There is not separate payment network for Escrow because escrow is just an intermediary phase of the existing payment networks, but currently Escrow is only implemented for ERC20FeeProxy PN.
The way escrow detection works is we get the escrow events from the graph, together with our payment/refund events.
Then the balance object returned from getBalance function in our Payment detectors contains an additional array called escrowEvents.
There are changes in multiple files here because the return type of getTransferEvents() and getEvents() was previously just an array of payment events, but now it is an object with two arrays:
{ paymentEvents: [], escrowEvents: [] }