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

ON-670: Refactor ERC-7432 #27

Merged
merged 8 commits into from
Apr 12, 2024
Merged

Conversation

ernanirst
Copy link
Contributor

This PR aims to simplify ERC-7432 by removing two requirements:

  • It's no longer required to support non-unique roles.
  • it's no longer required to support invalidating all roles when an NFT is transferred.

Changes worth mentioning:

  • When the NFT is required to be deposited in the roles registry contract, the grantRole function is responsible for depositing, and the optional interface IERC7432VaultExtension is responsible for withdrawing.
  • grantee was removed from most function signatures as we no longer need to support non-unique roles.
  • grantor was removed from most function signatures as we no longer need to support invalidating roles when NFTs are transferred.

Other grammatical changes:

  • The bytes32 role identifier was renamed from role to roleId.
  • The RoleAssignment struct was renamed to Role

contracts/ERC7432/NftRolesRegistryVault.sol Outdated Show resolved Hide resolved
contracts/ERC7432/NftRolesRegistryVault.sol Outdated Show resolved Hide resolved
contracts/ERC7432/NftRolesRegistryVault.sol Outdated Show resolved Hide resolved
@ernanirst ernanirst merged commit 7d025ed into master Apr 12, 2024
1 check passed
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