Skip to content

Commit 9186146

Browse files
committed
chore: multiple improvements including signature binding and guardian recovery cancellation
1 parent 4eadc83 commit 9186146

File tree

8 files changed

+446
-643
lines changed

8 files changed

+446
-643
lines changed

contracts/account/extensions/ERC7579Modules/SocialRecoveryExecutor.sol

Lines changed: 247 additions & 264 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
},
4848
"devDependencies": {
4949
"@openzeppelin/contracts": "file:lib/@openzeppelin-contracts",
50-
"husky": "^9.1.7",
51-
"solhint-plugin-openzeppelin": "file:lib/@openzeppelin-contracts/scripts/solhint-custom"
50+
"husky": "^9.1.7"
5251
},
5352
"lint-staged": {
5453
"*.{js,ts}": [

test/account/extensions/ERC7579Modules/SocialRecoveryExecutorModule.test.js

Lines changed: 186 additions & 363 deletions
Large diffs are not rendered by default.

test/helpers/erc7579-modules.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1+
const { Enum } = require('@openzeppelin/contracts/test/helpers/enums');
2+
const { formatType } = require('@openzeppelin/contracts/test/helpers/eip712');
3+
14
const SocialRecoveryExecutorHelper = {
2-
RecoveryStatus: {
3-
NotStarted: 0,
4-
Started: 1,
5-
Cancelled: 2,
5+
RecoveryStatus: Enum('NotStarted', 'Started', 'Ready'),
6+
START_RECOVERY_TYPEHASH: {
7+
StartRecovery: formatType({ account: 'address', executionCalldata: 'bytes', nonce: 'uint256' }),
68
},
7-
RECOVERY_MESSAGE_TYPE: {
8-
RecoveryMessage: [
9-
{ name: 'account', type: 'address' },
10-
{ name: 'nonce', type: 'uint256' },
11-
],
9+
CANCEL_RECOVERY_TYPEHASH: {
10+
CancelRecovery: formatType({ account: 'address', nonce: 'uint256' }),
1211
},
1312
};
1413

0 commit comments

Comments
 (0)