-
Notifications
You must be signed in to change notification settings - Fork 249
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
Reference implementation for proposed Multi-token spec (NEP-245) #776
Conversation
…token spec (NEP-245)
@austinabell this is the token standard I mentioned a while ago coming down the pipeline. PTAL when you get a chance @jriemann is doing the development on this one so feel free to ping him, I'm around to talk spec things if needed . |
@jlogelin will likely review the logical components and how they match the spec. I'll be more than happy to review this once I have some time also |
|
||
#[tokio::test] | ||
async fn test_total_supply() -> anyhow::Result<()> { | ||
// TODO: Write simulation tests involving cross-contract calls (mt_transfer_call, etc). |
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.
Note, you'll probably use workspaces tests based on what's above, but just a warning to not invest time into sim tests (near-sdk-sim
) as it will be deprecated soon in favor of workspaces.
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.
Gotcha
@telezhnaya pinging you since you were active on the NEP-245 review & this is related. Could you take a look as well, if you have time? |
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.
Could you please add tests that we produce valid event logs on each mint/transfer/burn?
/// Take some action after receiving a multi-token's | ||
/// | ||
/// ## Requirements: | ||
/// * Contract MUST restrict calls to this function to a set of whitelisted NFT |
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.
/// * Contract MUST restrict calls to this function to a set of whitelisted NFT | |
/// * Contract MUST restrict calls to this function to a set of whitelisted MT |
enum Nep245EventKind<'a> { | ||
MtMint(&'a [MtMint<'a>]), | ||
MtTransfer(&'a [MtTransfer<'a>]), | ||
// NftBurn(&'a [NftBurn<'a>]), |
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.
// NftBurn(&'a [NftBurn<'a>]), |
Closing as work seems to have been continued here: #950 |
This is a reference implementation of the current draft Multi-token spec (NEP-245) - near/NEPs#245 . I am sending this out now to be reviewed in conjunction with that PR so that reviewers can start looking it over.
The work is based on the repo started by @i3ima who deserves credit for getting the ball rolling - https://github.com/i3ima/nep-246 . I have filled in the gaps and it should now be close to the draft spec.
Not fully complete yet: