epam / mintgate

1 stars 2 forks source link

[HIGH] M1 demo feedback: implement view methods with Pagination to match NEP-181 #47

Closed zahhar closed 3 years ago

zahhar commented 3 years ago

NEP-181 defines 4 READ methods to be used in NTF contract: https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Enumeration.md

Our implementation will return Tokens, not Collectibles.

To make it happen, we need the following change:

  1. Rename get_tokens_by_owner into nft_tokens_for_owner and add Pagination
  2. Rename get_tokens_by_owner_and_gate_id into nft_tokens_for_owner_and_gate_id and add Pagination
  3. Rename get_collectible_by_gate_id into nft_collectible_for_gate_id for consistency
  4. Rename get_collectibles_by_creator into nft_collectibles_for_creator for consistency
  5. Add nft_supply_for_owner method to return just a total amount of all tokens owned by AccountID (in all GateIds)
  6. Add nft_tokens method to return a list of TokenIDs (NB! Not a Token Structures) with Pagination