-
Notifications
You must be signed in to change notification settings - Fork 373
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
chore(p/grc20): Distinct Event Types for GRC20 Functions #2749
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2749 +/- ##
==========================================
+ Coverage 60.90% 60.92% +0.01%
==========================================
Files 564 564
Lines 75273 75273
==========================================
+ Hits 45848 45859 +11
+ Misses 26055 26044 -11
Partials 3370 3370
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@notJoon, can you elaborate more on why you want to do this? |
The ERC20 spec mentions that a mint function should emit a transfer from a zero address to the address receiving new tokens (see Since we're actively working on the GRC20 package, let me know how crucial this is to you; we (or you) can try to implement what I mentioned above in the next iteration. It mentions nothing about the burn case, so I guess we can do whatever we want there. cc @moul |
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.
Thank you for the mini fix 🙏
Can you please merge |
Description
Currently, the event type for grc20 is uniformly set to
TrasferEvent
(execpt forApproval
function), which necessitated making RPC calls to check every block.Therefore, I have modified it by adding event types for each function to distinguish them from one another.
In this case, we can reduce the number of RPC calls by retrieving data only when the target event type occurs.
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description