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

Implemented the soulbound feature for NFTs #693

Merged
merged 7 commits into from
Nov 2, 2023
Merged

Conversation

miladz68
Copy link
Contributor

@miladz68 miladz68 commented Oct 30, 2023

Description

This PR implements the soulbound feature for the NFTs. Soulbound NFTs cannot be sent or received by users.

Reviewers checklist:

  • Try to write more meaningful comments with clear actions to be taken.
  • Nit-picking should be unblocking. Focus on core issues.

Authors checklist

  • Provide a concise and meaningful description
  • Review the code yourself first, before making the PR.
  • Annotate your PR in places that require explanation.
  • Think and try to split the PR to smaller PR if it is big.

This change is Reviewable

@miladz68 miladz68 requested a review from a team as a code owner October 30, 2023 13:51
@miladz68 miladz68 requested review from dzmitryhil, ysv and wojtek-coreum and removed request for a team October 30, 2023 13:51
Copy link
Contributor Author

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @wojtek-coreum, and @ysv)

a discussion (no related file):
Please note that tests are missing.


Copy link
Contributor Author

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 7 files reviewed, all discussions resolved (waiting on @dzmitryhil, @wojtek-coreum, and @ysv)

a discussion (no related file):

Previously, miladz68 (milad) wrote…

Please note that tests are missing.

tests are now implemented.


dzmitryhil
dzmitryhil previously approved these changes Oct 31, 2023
Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 5 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @miladz68, @wojtek-coreum, and @ysv)


docs/static/openapi.json line 7291 at r2 (raw file):

        "whitelisting",
        "disable_sending",
        "soulbound"

@ysv When do we update the spec and table with features?

Copy link
Contributor

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 5 files at r1, 3 of 3 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @miladz68 and @wojtek-coreum)


docs/static/openapi.json line 7291 at r2 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

@ysv When do we update the spec and table with features?

Before release
added this one to checklist


integration-tests/modules/assetnft_test.go line 2057 at r3 (raw file):

}

func TestAssetNFTSoulbound(t *testing.T) {

nit: I think we added feature where we can mint with destination
Could you test if for soul-bound NFT also pls ?


integration-tests/modules/assetnft_test.go line 2124 at r3 (raw file):

	requireT.NoError(err)

	// try to send from recipient to issuer (it is not allowed)

hm, I'm not sure about this behaviour.
I thought that issuer can always receive/send sould-bound NFTs but none else.
Because in current implementation NFT will stay on users acc forever.

Copy link
Contributor Author

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @wojtek-coreum and @ysv)


integration-tests/modules/assetnft_test.go line 2057 at r3 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

nit: I think we added feature where we can mint with destination
Could you test if for soul-bound NFT also pls ?

Done.


integration-tests/modules/assetnft_test.go line 2124 at r3 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

hm, I'm not sure about this behaviour.
I thought that issuer can always receive/send sould-bound NFTs but none else.
Because in current implementation NFT will stay on users acc forever.

Yes, but if the user can send it back, it will not be soulbound.

ysv
ysv previously approved these changes Oct 31, 2023
Copy link
Contributor

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @wojtek-coreum)

Copy link
Contributor

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @wojtek-coreum)

Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r3, 1 of 1 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @wojtek-coreum)

@miladz68 miladz68 merged commit b74f824 into master Nov 2, 2023
7 checks passed
@miladz68 miladz68 deleted the milad/nft-soulbound branch November 2, 2023 09:02
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.

3 participants