Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Customizable transfer restrictions per Hypercert #83

Closed
ryscheng opened this issue Jan 3, 2023 · 6 comments
Closed

Customizable transfer restrictions per Hypercert #83

ryscheng opened this issue Jan 3, 2023 · 6 comments
Assignees
Labels
category:onchain Smart contracts p1:ready Ready for work

Comments

@ryscheng
Copy link
Member

ryscheng commented Jan 3, 2023

For each hypercert, we want to be able to set how transfers are restricted by the minter at mint time
For example:

  • All transfers are disabled
  • All transfers are enabled
  • Only allow transfer where from is the original minter
  • Only allow transfers if the to is from an allowlist.

Potential implementation pathway:
https://docs.openzeppelin.com/contracts/4.x/api/token/erc1155#ERC1155Pausable
https://docs.openzeppelin.com/contracts/4.x/api/token/erc1155#ERC1155-_beforeTokenTransfer-address-address-address-uint256---uint256---bytes-

@ryscheng ryscheng added category:onchain Smart contracts p2:grabbag If you got time, grab one labels Jan 3, 2023
@ryscheng ryscheng added this to the Gitcoin Launch milestone Jan 3, 2023
@ryscheng ryscheng added p1:ready Ready for work and removed p2:grabbag If you got time, grab one labels Jan 4, 2023
@ryscheng ryscheng self-assigned this Jan 4, 2023
@holkexyz
Copy link
Member

holkexyz commented Jan 5, 2023

If a secondary owner isn’t allowed to transfer the hypercert, they also can’t donate/retire/dedicate it, right? Can we ensure that they can always retire it?

@ryscheng
Copy link
Member Author

ryscheng commented Jan 8, 2023

First draft of transfer restrictions here
Network-Goods/hypercerts-protocol#83

@holkeb are these 3 policies sufficient?
AllowAll, DisallowAll, FromCreatorOnly (See IHypercertToken.sol)

@ryscheng
Copy link
Member Author

ryscheng commented Jan 9, 2023

Closing for now until we get more guidance from legal on whatever else they need in the contract.

@ryscheng ryscheng closed this as completed Jan 9, 2023
@holkexyz
Copy link
Member

@bitbeckers responding here to your telegram message. cc @Jipperism

For the pilot we want all hypercerts to have the transfer restriction FromCreatorOnly. So this should be hard coded into the frontend for the pilot. However, the contract should allow for all three policies.

@ryscheng also wanted to check to what extent these policies are upgradable, e.g. adding other policies later. At least for me that's still an open question.

@ryscheng
Copy link
Member Author

We should be able to add more policies in the future, they just show up as new enum elements.

@bitbeckers
Copy link
Contributor

We should be able to add more policies in the future, they just show up as new enum elements.

Let's make sure to test this when we add in the storage gaps and testing out the upgradeability further

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
category:onchain Smart contracts p1:ready Ready for work
Projects
None yet
Development

No branches or pull requests

4 participants