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 3673cc85..30429317 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 6e444748..576cb834 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -1067,6 +1067,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: true, SIGN: true, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x00000000000000000000000000000000000000000000000000000000003f3f7f', }, @@ -1095,6 +1096,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: false, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000000000', }, @@ -1123,6 +1125,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: true, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000200a00', }, @@ -1151,6 +1154,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: false, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000040800', }, @@ -1179,6 +1183,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: false, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000040004', }, @@ -1207,6 +1212,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: false, SIGN: false, EXECUTE_RELAY_CALL: false, + ERC4337_PERMISSION: false, }, hex: '0x0000000000000000000000000000000000000000000000000000000000000a00', }, @@ -1288,6 +1294,7 @@ describe('Running @erc725/erc725.js tests...', () => { DECRYPT: true, SIGN: true, EXECUTE_RELAY_CALL: true, + ERC4337_PERMISSION: true, }, ); assert.deepStrictEqual( @@ -1318,6 +1325,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; }