-
Notifications
You must be signed in to change notification settings - Fork 65
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
extends solana/caip19 #25
extends solana/caip19 #25
Conversation
updated using |
@bumblefudge could you take another look? |
updated using |
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 think it'd also be nice if you could include the CAIP-22 proposal. I think your issue is titled with CAIP-19, but the ERC721 example with TokenId is based on CAIP-22
07c6949
to
10a6e6a
Compare
@qbig - we can move to get this in - can you add a quick description to the PR as well? |
@obstropolos could you take a look when it's convenient? |
namespace-identifier: solana-caip19
title: Solana Namespace - Asset
author: Qiao Liang (@qbig)
discussions-to:
status: Draft
type: Standard
created: 2022-06-01
updated: 2022-06-01
requires: ["CAIP-2", "CAIP-10", "CAIP-19", "CAIP-30"]
CAIP-19
For context, see the CAIP-19 specification.
Rationale
On solana, all contracts are stateless and state is instead represented using "accounts". More specifically, all fungible and non-fungible tokens are using the same instance of token contracts and for each token:
And the difference between fungible token and non-fungible token is that non-fungible token mint has a total supply of 1 and zero decimal place.
But both asset type can be identified by their "mint" account.
qbig marked this conversation as resolved.
Show resolved
Syntax
After the CAIP-2 namespace+chainID, a slash defines an
asset_namespace
and anasset_reference
. And since both fungible and non-fungible tokens can be identified using the mint account, we could usetoken
,nft
as the namespace and the address of themint
account as the reference.Examples
References
Copyright
Copyright and related rights waived via CC0.