-
Notifications
You must be signed in to change notification settings - Fork 5
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
Write Settlements to DB from Action #185
Conversation
fd5098f
to
09383a5
Compare
a7d7f5d
to
c3597e2
Compare
Introducing transaction log parsing via ethers library with appropriate Contract artifacts. Namely, we introduce dependencies on @cowprotocol/contracts which contain the abi files for GPv2Settlement and iERC20 and suffice for us to decode relevant event data from settlement transactions. For us these are Transfer, Settlement and Trade. We construct Event types out of each which only keep the parts that matter for our purposes (namely TradeEvent having owner as the only relevant field).
New dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No new dependency issues detected in pull request Bot CommandsTo ignore an alert, reply with a comment starting with Pull request alert summary
📊 Modified Dependency Overview:
|
*Note that this was open for almost a month without proper review. |
Part of #177
Now that our action parses event data from transaction receipts (#182) - the next logical step is to insert these records to the DB.
In future iterations it will be necessary to maintain records of all processed settlements because some batches will not have any internalized and this is the only way we can tell if the batch was not accidentally forgotten.
The primary changes here are separated into different commits
Test Plan
There are local unit tests introduced here, but this has also been running on Tenderly actions now for over a month.