Skip to content
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

FRC-0046 First draft of fungible token standard. #435

Merged
merged 3 commits into from
Aug 31, 2022
Merged

Conversation

anorth
Copy link
Member

@anorth anorth commented Aug 17, 2022

This is the first draft of a fungible token standard API for native actors, as discussed in #407

An implementation of this standard is in development at https://github.com/helix-onchain/filecoin/tree/main/fil_fungible_token

FYI @jsuresh, @alexytsu @ZenGround0

FRCs/frc-tokenstandard.md Outdated Show resolved Hide resolved
@Kubuxu
Copy link
Contributor

Kubuxu commented Aug 17, 2022

I see that decimals() was discarded. Should we provide something like granularity() from EIP-777. While rejecting transactions internally is the correct thing to do, I can see a need for knowing what is the granularity of a given token. For example a generic wallet application and users wanting to transfer half of their tokens.

@jsuresh
Copy link

jsuresh commented Aug 18, 2022

@Kubuxu - I understood the purpose of granularity differently. Love a few more examples from you as I may have missed important use cases.

my understanding is everything has 18 DP as this being different is an endless source of client bugs. However, in certain use cases it doesn’t make sense to hold or transact partial tokens.

my goto example is games. Eg. Rupees in Zelda have to be ‘whole’ for use in game and therefore trading.

My assumption was in filecoin this kind of use case would be rare. However, would love to hear other motivations/examples of ways you think this would come in handy.

@anorth
Copy link
Member Author

anorth commented Aug 18, 2022

Let's take granularity discussion to #407 (comment) and leave this review for FRC style/completeness.

@jennijuju
Copy link
Member

hi - this is our FRC-0046

@jennijuju jennijuju changed the title First draft of fungible token standard. FRC-0046 First draft of fungible token standard. Aug 21, 2022
@anorth
Copy link
Member Author

anorth commented Aug 22, 2022

I have pushed a new commit which:

  • adds granularity method
  • expands the return values from some methods
  • adds tokenData separate from operatorData for the receiver hook
  • clarifies a few things

@jennijuju
Copy link
Member

is this ready for review? for fip editor?

@anorth
Copy link
Member Author

anorth commented Aug 28, 2022

@jennijuju I think it is, but I think there's one more round of minor tweaks coming, so let's wait just a week more.

@anorth anorth requested a review from Kubuxu August 30, 2022 01:32
@anorth
Copy link
Member Author

anorth commented Aug 30, 2022

I have pushed updates to

  • make the receiver hook universal
  • use FRC-42 compliant method names

Let's leave this for a day or two, but then I think it's ready for merge. Of course it's still in draft.

@anorth anorth merged commit 126cefc into master Aug 31, 2022
@anorth anorth deleted the anorth/token branch August 31, 2022 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants