Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement PSP34 standard #79

Merged
merged 15 commits into from
Apr 18, 2023
Merged

Implement PSP34 standard #79

merged 15 commits into from
Apr 18, 2023

Conversation

realnimish
Copy link
Member

Closes #6

@realnimish realnimish self-assigned this Mar 27, 2023
@realnimish
Copy link
Member Author

I've added the support of PSP34 & PSP34Metadata standard so far.
ArtZero integration expects a lot more traits, namely - Ownable, PSP34Enumerable, Psp34Traits, AdminTrait.

Issues:

  1. PSP34Enumberable expects support of iterating over all NFTs.
  2. Not sure what's AdminTrait::transfer_psp22. Asked on the telegram.
  3. Psp34Traits is very rigid - messages with a problem -
    • token_uri expects token_id: u64 as input
    • get_last_token_id is meaningless in our case at the moment.
    • lock metadata

@realnimish realnimish force-pushed the feat/implement-psp34-standard branch 2 times, most recently from 0fc7c39 to 0375a61 Compare April 13, 2023 14:44
@realnimish realnimish force-pushed the feat/implement-psp34-standard branch from 0375a61 to 6825ba8 Compare April 13, 2023 14:46
@realnimish realnimish requested a review from wottpal April 13, 2023 14:49
Copy link
Member

@wottpal wottpal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far, most points I highlighted are naming/consistency-related.

When I run the tests locally I get the following warnings, you might want to fix this, too:

warning: unused variable: `operator`
    --> azns_registry/lib.rs:1008:13
     |
1008 |             operator: &AccountId,
     |             ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_operator`
     |
     = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `from`
    --> azns_registry/lib.rs:1009:13
     |
1009 |             from: &AccountId,
     |             ^^^^ help: if this is intentional, prefix it with an underscore: `_from`

warning: unused variable: `to`
    --> azns_registry/lib.rs:1010:13
     |
1010 |             to: &AccountId,
     |             ^^ help: if this is intentional, prefix it with an underscore: `_to`

warning: unused variable: `id`
    --> azns_registry/lib.rs:1011:13
     |
1011 |             id: &Id,
     |             ^^ help: if this is intentional, prefix it with an underscore: `_id`

warning: unused variable: `data`
    --> azns_registry/lib.rs:1012:13
     |
1012 |             data: &Vec<u8>,
     |             ^^^^ help: if this is intentional, prefix it with an underscore: `_data`

@wottpal wottpal merged commit cde8f36 into develop Apr 18, 2023
@realnimish realnimish deleted the feat/implement-psp34-standard branch April 19, 2023 19:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PSP-34 support & ArtZero marketplace integration
2 participants