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

SFT Roles Registry #25

Merged
merged 19 commits into from
Jan 9, 2024
Merged

SFT Roles Registry #25

merged 19 commits into from
Jan 9, 2024

Conversation

ernanirst
Copy link
Contributor

@ernanirst ernanirst commented Dec 28, 2023

Refactor SFT Roles Registry standard to accommodate a wider range of implementations. Here is the summary of the changes:

  • Renamed record to commitment. The user now calls the function commitTokens instead of createRecord. Commitment more intuitive as different implementations can allow users to commit tokens either by depositing on the contract or by freezing assets (record was too vague).
  • Included additional view functions to allow external contracts to read information about the token commitment.
  • Added optional interface ICommitTokensAndGrantRoleExtension, allowing users to commit tokens and grant roles in a single transaction.
  • Added optional interface IRoleBalanceOfExtension, allowing dapps to easily fetch the number of tokens delegated to an user.
  • Fixed bug on _findCaller that prevented grantee to revoke roles before they expire.
  • Finished implementations for single and multiple roles.

Other less important changes:

  • Fixed lint.
  • Updated readme.
  • Generating ERC-165 identifier programmatically on tests.
  • Renamed nonce to itemId.
  • Removed forge temporarily (will be included back in the future).

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
contracts/RolesRegistry/SftRolesRegistry.sol Show resolved Hide resolved
@karacurt karacurt merged commit ccf0ac6 into master Jan 9, 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