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

Add partial soulbound token #114

Closed
wants to merge 6 commits into from

Conversation

neokry
Copy link
Collaborator

@neokry neokry commented Aug 18, 2023

Adds partial soulbound token implementation for colleciton plus: https://hackmd.io/eFSgnXefSUujGr75EqPCCg

  • adds transferFromAndLock to allow minters to lock tokens to a specified account
  • saves locked status for each token in a bitmap
  • only allows reserved tokens to be locked

Code review:

  • Is a bitmap the best way to flag tokenIds as claimed?

@neokry neokry temporarily deployed to Test August 18, 2023 08:03 — with GitHub Actions Inactive
@neokry neokry temporarily deployed to Test August 18, 2023 08:05 — with GitHub Actions Inactive
@neokry neokry requested a review from jgeary August 18, 2023 08:09
/// @title IToken
/// @author Neokry
/// @notice The external Token events, errors and functions
interface IPartialSoulboundToken is IUUPS, IERC721Votes, IBaseToken, IERC5192, PartialSoulboundTokenTypesV1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: personally i prefer account- compared to soul- bound tokens, even though i know vitalik wrote about soul-bound they technically really are closer to account-bound and the terminology feels cleaner for me.

@iainnash
Copy link
Contributor

A bitmap makes sense here since it saves gas for the next user within the 256 chunk slot. Another option (perhaps fine on l2) is just to do a mapping.

@neokry neokry closed this Oct 20, 2023
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.

2 participants