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

feat: add ALL_PERMISSIONS flag to encoding #384

Merged
merged 57 commits into from
Mar 4, 2024

Conversation

skimaharvey
Copy link
Collaborator

@skimaharvey skimaharvey commented Feb 22, 2024

What does this PR introduce?

  • Introduce the ALL_PERMISSIONS flag to encoding

Let's you set all permissions on one flag. Also added the logic where you can do combinations where:

  • ALL_PERMISSIONS with CHANGE_OWNER gives you the right hex.
  • ALL_PERMISSIONS with permissions that are already part of the ALL_PERMISSIONS value does not affect the hex etc

frozeman and others added 30 commits January 5, 2022 11:10
…ase--branches--main--components--erc725.js

chore(main): release 0.19.0
CallumGrindle and others added 26 commits October 18, 2023 16:27
…ase--branches--main--components--erc725.js

chore(main): release 0.20.0
…ase--branches--main--components--erc725.js

chore(main): release 0.20.1
…ase--branches--main--components--erc725.js

chore(main): release 0.21.0
…ase--branches--main--components--erc725.js

chore(main): release 0.21.1
…ase--branches--main--components--erc725.js

chore(main): release 0.21.2
…ase--branches--main--components--erc725.js

chore(main): release 0.21.3
…ase--branches--main--components--erc725.js

chore(main): release 0.22.0
…ase--branches--main--components--erc725.js

chore(main): release 0.23.0
Copy link
Collaborator

@CJ42 CJ42 left a comment

Choose a reason for hiding this comment

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

Added 1st round of review

@@ -179,7 +179,8 @@ export const LSP6_DEFAULT_PERMISSIONS = {
DECRYPT : "0x0000000000000000000000000000000000000000000000000000000000100000",
SIGN : "0x0000000000000000000000000000000000000000000000000000000000200000",
EXECUTE_RELAY_CALL : "0x0000000000000000000000000000000000000000000000000000000000400000",
ERC4337_PERMISSION : "0x0000000000000000000000000000000000000000000000000000000000800000"
ERC4337_PERMISSION : "0x0000000000000000000000000000000000000000000000000000000000800000",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest adding a comment that this is not a standard permission defined in LSP6, but used for integration of ERC4337 standard.

Otherwise, people might look into the LSP6 specs to understand what this is used for, but will not find it.

Do we have a link in our docs or a guide that mentions this permission? Maybe worth adding it here.

@Hugoo @skimaharvey wdyt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i agree that this is confusing. I am not sure if the confusion starts at the lib level but imo more at the LIPs level and probably we should fix it there first

@@ -1337,6 +1343,7 @@ describe('Running @erc725/erc725.js tests...', () => {
SIGN: false,
EXECUTE_RELAY_CALL: false,
ERC4337_PERMISSION: false,
ALL_PERMISSIONS: false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be worth adding some extra tests to tests that when all permission is set and others are set to false, it removes them, etc... More cases

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes ideally we can randomize them like i did for some tests i added. I find it not efficient to do one test at a time. Will think about it

@CJ42 CJ42 merged commit 8a78336 into ERC725Alliance:develop Mar 4, 2024
2 checks 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.

6 participants