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: proposed fungible token trait #5
feat: proposed fungible token trait #5
Changes from 1 commit
556730d
cc6e3a4
53636c9
d69b1f6
f7f5c90
96998dd
bdcf8b2
6708391
462755b
557602c
7affd69
ff10071
19d0d53
7301efd
0429c32
836e95a
4dd02c8
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.
The signature should have a sender because the sender can be the
tx-sender
or thecontract-caller
.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.
The order in the native function is
amount
sender
recipient
. To make it easier for clarity developers, I suggest to use that ordering of the native function.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 had not needed to set a sender, but I suppose this is a valid point
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.
Thanks Friedger, I will change this based on that suggestion. I am actually not sure how authorization works in
ft-transfer
- is there any? The docs don't mention it as an error code, so likely not. We should add a note about authorization, and add it as boilerplate in the example repo. I'll also add tests around authorization.Error codes will be fleshed out, as well.
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.
There isn't any built-in authorization in
ft-transfer?
(ornft-transfer?
for that matter). The contract that declares the token is solely responsible for ensuring that the caller is permitted to use the givensender
argument. Note that this is different fromstx-transfer?
, which does require that thesender
argument is equal to the calling context'stx-sender
.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.
What to put if total-supply is unlimited?
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.
Do you have an example of a token with unlimited liquid supply?
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.
the supply may be unlimited, but this is meant to be the current supply if you sum all the addresses that contain the token. So always a specific value the token should keep track of
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.
Would you consider adding @psq as a co-author of this SIP?
Also, this paragraph would belong in the
Related Work
section, since it's describing a similar system.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.
Of course I would be more than happy to add @psq! Per SIP-000, I need to add an email address - do you have one you're willing to share, Pascal?