-
Notifications
You must be signed in to change notification settings - Fork 79
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
[event_v2] indexer logic update to handle migration #360
Conversation
b6fcdc7
to
107707c
Compare
@@ -16,3 +18,8 @@ pub mod token_models; | |||
pub mod token_v2_models; | |||
pub mod transaction_metadata_model; | |||
pub mod user_transactions_models; | |||
|
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.
if v1 name is "XXXEvent" then v2 name is always "XXX" or "XXX<YYY..." and emitted just before v1 so if the preceding event exists and matches the name we will dedup/skip the current v1.
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.
nit: can you add this as a comment in the code, and make a note that it's for events v2 migration?
107707c
to
5716a93
Compare
5716a93
to
b42a35d
Compare
0e42f40
to
b5a0bb1
Compare
event.type_str != "0x3::token::DepositEvent" | ||
and event.type_str != "0x3::token::Deposit" |
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.
since these are used in multiple places, would be good to make them a constant
446be63
to
15a7fc9
Compare
This reverts commit 3551f40.
This reverts commit 3551f40.
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
* [event_v2] an example code for event v2 migration * event v2 indexing. --------- Co-authored-by: Larry Liu <[email protected]>
Co-authored-by: Larry Liu <[email protected]>
PR description
In this PR we add event v2 migration indexing support.
PRs to handle:
Events to migrate
Notes
An example for event v2 migration.
whether a new field would be added can be seen here:
https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-71.md
But the ground truth is in the code. Please verify.