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.
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(NFT): add events to standard #627
feat(NFT): add events to standard #627
Changes from 5 commits
a6e16e8
3238e4a
b65081a
19151a1
4b8f0aa
d27974f
c32de7a
a32852b
1ddc497
d4a4c8b
344d483
30a2be5
00e0bf5
bc403d5
b6bc5f3
8fc2c80
62694c9
0726e8e
f9fb90f
2f2c0a2
7202200
0917ab5
62112ad
4d494e8
a01075c
63beb49
c184d9e
79a319e
3524ffd
c0ef525
db7d5d4
83a3b75
38656b0
740a594
9d7474c
9c561e0
7187af3
3459d27
1404f55
1746487
9d0d28d
1ce258b
64c1c6f
d004203
179faf1
bce9abe
ae405da
173f6f7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We may consider using
Cow<'a, str>
instead of Strings to avoid unnecessary clones when users would need to generate the events without giving the ownership over the strings. Yet, that might make the API harder to follow.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.
Yeah again this is a copy/paste and I agree that we should try to minimize the cost of these logs.
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.
Still not sure how to fix this. It is annoying with
to_string
s everywhere.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.
This API has a few problems:
The usage of these methods will be error-prone to use and hard to reason about:
(You already mixed up the order of
authorized_id
in transfer and burn methods)These methods promote non-batched events and thus we promote using more gas on events than necessary
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.
Yeah oops, this was from just following the ordering from the struct.
I agree, my inital thoughts were that they were the common case so it should be easy to use.
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.
I fixed
1
and added methods to log data vectors.