diff --git a/docs/classes/ERC725.md b/docs/classes/ERC725.md index a5ecd2ae..d26b5c78 100644 --- a/docs/classes/ERC725.md +++ b/docs/classes/ERC725.md @@ -754,7 +754,8 @@ ERC725.encodePermissions({ ENCRYPT: false, DECRYPT: false, SIGN: false, - EXECUTE_RELAY_CALL: false + EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false }), // '0x0000000000000000000000000000000000000000000000000000000000000110' diff --git a/src/constants/constants.ts b/src/constants/constants.ts index 164a79b0..c0cc79ca 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -167,6 +167,7 @@ export const LSP6_DEFAULT_PERMISSIONS = { DECRYPT : "0x0000000000000000000000000000000000000000000000000000000000100000", SIGN : "0x0000000000000000000000000000000000000000000000000000000000200000", EXECUTE_RELAY_CALL : "0x0000000000000000000000000000000000000000000000000000000000400000", + ERC4337_PERMISSION : "0x0000000000000000000000000000000000000000000000000000000000800000" }; export const LSP6_ALL_PERMISSIONS = diff --git a/src/index.test.ts b/src/index.test.ts index b09c8889..b8f34c85 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -1079,6 +1079,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: true, SIGN: true, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x00000000000000000000000000000000000000000000000000000000003f3f7f', }, @@ -1107,6 +1108,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: false, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000000000', }, @@ -1135,6 +1137,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: true, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000200a00', }, @@ -1163,6 +1166,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: false, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000040800', }, @@ -1191,6 +1195,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: false, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000040004', }, @@ -1219,6 +1224,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: false, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000000a00', }, @@ -1300,6 +1306,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: true, SIGN: true, EXECUTE_RELAY_CALL: true, + ERC4337_PERMISSION: true, }, ); assert.deepStrictEqual( @@ -1330,6 +1337,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: true, SIGN: true, EXECUTE_RELAY_CALL: true, + ERC4337_PERMISSION: true, }, ); }); diff --git a/src/index.ts b/src/index.ts index e7924b75..d75df5ae 100644 --- a/src/index.ts +++ b/src/index.ts @@ -500,6 +500,7 @@ export class ERC725 { DECRYPT: false, SIGN: false, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }; const permissionsToTest = Object.keys(LSP6_DEFAULT_PERMISSIONS); diff --git a/src/types/Method.ts b/src/types/Method.ts index 1c794a67..681aee85 100644 --- a/src/types/Method.ts +++ b/src/types/Method.ts @@ -47,4 +47,5 @@ export interface Permissions { DECRYPT?: boolean; SIGN?: boolean; EXECUTE_RELAY_CALL?: boolean; + ERC4337_PERMISSION?: boolean; }