-
Notifications
You must be signed in to change notification settings - Fork 84
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
[FA migration] When coinstore is deleted we miss the FA activities #691
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #691 +/- ##
=======================================
- Coverage 49.6% 48.8% -0.8%
=======================================
Files 252 252
Lines 28660 28667 +7
=======================================
- Hits 14223 14002 -221
- Misses 14437 14665 +228 ☔ View full report in Codecov by Sentry. |
// When coinstore is deleted we have no way of getting the mapping but hoping that there is | ||
// only 1 coinstore deletion by owner address. This is a mapping between owner address and deleted coin type | ||
// This is not ideal as we're assuming that there is only 1 coinstore deletion by owner address, this should be | ||
// replaced by an event (although we still need to keep this mapping because blockchain) |
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.
CoinStoreDeletion
will replace CoinEventHandleDeletion
and include CoinStore aptos-labs/aptos-core#15730
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.
Great. I'm not using the events now so will just wait for that event to be on testnet and add the patch.
c07eeaf
to
5dd1d06
Compare
0f6c2f8
to
e80845e
Compare
948719b
to
caebca5
Compare
caebca5
to
7c0a8fe
Compare
1cfaa42
to
9b483cf
Compare
This is a temporary solution until we have a better event that has both the event address and the coin type so that we can map withdraw / deposit events to the proper coin type.
Caveat, if there are multiple coinstore deletions in the same account, in the same transaction, we will get this wrong.
Backfill
When first v2 only apt was created.
Testnet: 2598047902
Mainnet: 1669115601
Testing
May need to add an integration test for this
Before we were missing apt withdraw
![image](https://private-user-images.githubusercontent.com/11738325/405828184-b2c5392f-7918-4241-936e-14d8b5400677.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5NTgxMTUsIm5iZiI6MTczOTk1NzgxNSwicGF0aCI6Ii8xMTczODMyNS80MDU4MjgxODQtYjJjNTM5MmYtNzkxOC00MjQxLTkzNmUtMTRkOGI1NDAwNjc3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE5VDA5MzY1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlMjRmYmY1MjY5NDkyMWE5OTdmY2MyZWRlZDNiNmM5YTRiNjkxNDg2OWQ2Y2NiYThmODZiM2NjOGE5MjFmY2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.KQydx0AZ1kd4w79pFC1gYNwMrGh_t9UVb4HCkLF0Y3Q)
Now we have it!
![image](https://private-user-images.githubusercontent.com/11738325/405828153-6700005e-0367-424e-8a53-38d7b6fa1740.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5NTgxMTUsIm5iZiI6MTczOTk1NzgxNSwicGF0aCI6Ii8xMTczODMyNS80MDU4MjgxNTMtNjcwMDAwNWUtMDM2Ny00MjRlLThhNTMtMzhkN2I2ZmExNzQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE5VDA5MzY1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU1YWQ0ODY4NzY3Yjg2OGNlNjA2ZTYwY2U4NzY4MDllY2QwZjM1OTMwMjM1NWU5M2ZhOGFhNWUyMjRiZmUxYzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.n2idEToEIvtVwU8Da6xAQJm3C0ucH8vWD0WoYlz1xDM)