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

Simple NFT #129

Closed
wants to merge 10 commits into from
Closed

Simple NFT #129

wants to merge 10 commits into from

Conversation

evgenykuzyakov
Copy link
Collaborator

@evgenykuzyakov evgenykuzyakov commented Feb 10, 2021

Remaining items as I see it:

  • Use Storage Management standard because this uses enumeration, which adds to a new map.
  • The NonFungibleTokenCore trait has mixed other standards in there, including approvals and enumeration. Let's separate these into different traits and corresponding files.

@evgenykuzyakov evgenykuzyakov marked this pull request as ready for review March 10, 2021 18:01
Co-authored-by: Bowen Wang <bowenwang1996@users.noreply.github.com>
@mikedotexe
Copy link
Contributor

This PR should be against master branch, yes?

@mikedotexe mikedotexe changed the title Attempt at simple NFT Simple NFT Mar 26, 2021
mikedotexe and others added 2 commits March 26, 2021 13:25
* nft-simple: add metadata for token and contract, for init and minting fns, and nft_metadata fn

* update nft_simple WASM file
…er (#135)

* update add callback to approvals with NonFungibleTokenApprovalsReceiver

* allow passing of deposit > 1 yocto when approve account id

* remove revoke_all callback and fix args

* finalized on_approve/revoke callbacks

* standards updates, enforce approval_id nonce, update nameing, remove revoke_approval callback

* fire approval callback no matter what

* clean up interface and deposit issues

* no bump approval on internal_transfer

* review edits OMG

* nft_approve: if account is already approver, don't check for attached deposit, refund if given

* add optional promise to nft_approve, fix approval id per entry via HashMap, add TokenReturnObject

* correct u64s that need to be U64

* nft-simple: add 6 basic unit tests

* review edits: remove return val on nft_approve, update sizing for hashmap

* remove as_return

* simplify Token struct, use U64, remove unnecessary helpers

* nft-simple: add exquisite corpse and simulation tests, ft wasm

* nft-simple: add to simulation tests w/ exquisite corpse to demonstrate nft_approve

* Rework NFT simple contract

* use near-sdk 3.1.0, simplify sim tests to use basic test-nft contract

Co-authored-by: Mike Purvis <mikedotexe@gmail.com>
Co-authored-by: Evgeny Kuzyakov <ek@nearprotocol.com>
@mikedotexe
Copy link
Contributor

Shall we rename reference => reference_url?

We're trying to stick with the merged spec on this one, thanks tho! It is slightly odd
https://nomicon.io/Standards/NonFungibleToken/Metadata.html

@mikedotexe
Copy link
Contributor

Updated the initial description of this PR with changes I think we need before merging.

@mikedotexe
Copy link
Contributor

Closing in favor of putting this in the contract standards in the sdk near/near-sdk-rs#361

@mikedotexe mikedotexe closed this Jun 4, 2021
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.

5 participants