diff --git a/.changeset/young-readers-cover.md b/.changeset/young-readers-cover.md new file mode 100644 index 000000000..1e2253073 --- /dev/null +++ b/.changeset/young-readers-cover.md @@ -0,0 +1,7 @@ +--- +'@openzeppelin/wizard': patch +'@openzeppelin/wizard-common': patch +'@openzeppelin/contracts-mcp': patch +--- + +Solidity account signer: Add `WebAuthn` to the list of signers available. diff --git a/packages/common/src/ai/descriptions/solidity.ts b/packages/common/src/ai/descriptions/solidity.ts index 02028d87b..ab9b5c5ae 100644 --- a/packages/common/src/ai/descriptions/solidity.ts +++ b/packages/common/src/ai/descriptions/solidity.ts @@ -69,10 +69,11 @@ export const solidityAccountDescriptions = { signer: `Defines the signature verification algorithm used by the account to verify user operations. Options: - ECDSA: Standard Ethereum signature validation using secp256k1, validates signatures against a specified owner address - EIP7702: Special ECDSA validation using account's own address as signer, enables EOAs to delegate execution rights + - Multisig: ERC-7913 multisignature requiring minimum number of signatures from authorized signers + - MultisigWeighted: ERC-7913 weighted multisignature where signers have different voting weights - P256: NIST P-256 curve (secp256r1) validation for integration with Passkeys and HSMs - RSA: RSA PKCS#1 v1.5 signature validation (RFC8017) for PKI systems and HSMs - - Multisig: ERC-7913 multisignature requiring minimum number of signatures from authorized signers - - MultisigWeighted: ERC-7913 weighted multisignature where signers have different voting weights`, + - WebAuthn: Web Authentication (WebAuthn) assertion validation for integration with Passkeys and HSMs on top of P256`, batchedExecution: 'Whether to implement a minimal batching interface for the account to allow multiple operations to be executed in a single transaction following the ERC-7821 standard.', ERC7579Modules: diff --git a/packages/core/solidity/src/account.test.ts b/packages/core/solidity/src/account.test.ts index 6e1d66de8..2cc356480 100644 --- a/packages/core/solidity/src/account.test.ts +++ b/packages/core/solidity/src/account.test.ts @@ -4,6 +4,7 @@ import { account } from '.'; import type { AccountOptions } from './account'; import { buildAccount } from './account'; import { printContract } from './print'; +import { SignerOptions } from './signer'; /** * Tests external API for equivalence with internal API @@ -61,7 +62,7 @@ function format(upgradeable: false | 'uups' | 'transparent') { } } -for (const signer of [false, 'ECDSA', 'EIP7702', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const) { +for (const signer of SignerOptions) { for (const upgradeable of [false, 'uups', 'transparent'] as const) { if (signer === 'EIP7702' && !!upgradeable) continue; diff --git a/packages/core/solidity/src/account.test.ts.md b/packages/core/solidity/src/account.test.ts.md index 8b1d08595..3c33b3548 100644 --- a/packages/core/solidity/src/account.test.ts.md +++ b/packages/core/solidity/src/account.test.ts.md @@ -3135,7 +3135,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 named non-upgradeable +## Account with SignerMultisig named non-upgradeable > Snapshot 1 @@ -3146,17 +3146,29 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256 is Account, EIP712, ERC7739, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisig is Account, EIP712, ERC7739, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisig", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC1271 non-upgradeable +## Account with SignerMultisig with ERC1271 non-upgradeable > Snapshot 1 @@ -3166,10 +3178,12 @@ Generated by [AVA](https://avajs.dev). ␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1271 is Account, IERC1271, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ + contract CustomAccountWithSignerMultisigERC1271 is Account, IERC1271, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + MultiSignerERC7913(signers, threshold)␊ + {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ public␊ @@ -3179,10 +3193,22 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC7739 non-upgradeable +## Account with SignerMultisig with ERC7739 non-upgradeable > Snapshot 1 @@ -3193,17 +3219,29 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC7739 is Account, EIP712, ERC7739, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256ERC7739", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisigERC7739 is Account, EIP712, ERC7739, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigERC7739", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC721Holder non-upgradeable +## Account with SignerMultisig with ERC721Holder non-upgradeable > Snapshot 1 @@ -3215,17 +3253,29 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721Holder is Account, EIP712, ERC7739, SignerP256, ERC721Holder {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256ERC721Holder", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisigERC721Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigERC721Holder", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC1155Holder non-upgradeable +## Account with SignerMultisig with ERC1155Holder non-upgradeable > Snapshot 1 @@ -3237,17 +3287,29 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1155Holder is Account, EIP712, ERC7739, SignerP256, ERC1155Holder {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256ERC1155Holder", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisigERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC1155Holder {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigERC1155Holder", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC721Holder and ERC1155Holder non-upgradeable +## Account with SignerMultisig with ERC721Holder and ERC1155Holder non-upgradeable > Snapshot 1 @@ -3260,17 +3322,29 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerP256, ERC721Holder, ERC1155Holder {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder, ERC1155Holder {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC7821 Execution non-upgradeable +## Account with SignerMultisig with ERC7821 Execution non-upgradeable > Snapshot 1 @@ -3282,13 +3356,25 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, SignerP256, ERC7821 {␊ - constructor(bytes32 qx, bytes32 qy)␊ + contract MyAccount is Account, EIP712, ERC7739, MultiSignerERC7913, ERC7821 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerP256(qx, qy)␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -3301,7 +3387,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 non-upgradeable +## Account with SignerMultisig with ERC7579 non-upgradeable > Snapshot 1 @@ -3314,13 +3400,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerP256(qx, qy)␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3334,6 +3420,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -3345,14 +3443,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3360,7 +3458,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC1271 non-upgradeable +## Account with SignerMultisig with ERC7579 with ERC1271 non-upgradeable > Snapshot 1 @@ -3372,11 +3470,25 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, IERC1271, AccountERC7579, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ + contract MyAccount is Account, IERC1271, AccountERC7579, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + MultiSignerERC7913(signers, threshold)␊ + {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -3397,14 +3509,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3412,7 +3524,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC7739 non-upgradeable +## Account with SignerMultisig with ERC7579 with ERC7739 non-upgradeable > Snapshot 1 @@ -3425,13 +3537,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerP256(qx, qy)␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3445,6 +3557,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -3456,14 +3580,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3471,7 +3595,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 hooks non-upgradeable +## Account with SignerMultisig with ERC7579 hooks non-upgradeable > Snapshot 1 @@ -3485,13 +3609,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerP256(qx, qy)␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3505,6 +3629,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -3516,14 +3652,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3531,7 +3667,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 named upgradeable uups +## Account with SignerMultisig named upgradeable uups > Snapshot 1 @@ -3543,17 +3679,32 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisig is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisig", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3564,7 +3715,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC1271 upgradeable uups +## Account with SignerMultisig with ERC1271 upgradeable uups > Snapshot 1 @@ -3575,17 +3726,20 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3596,6 +3750,18 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -3605,7 +3771,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7739 upgradeable uups +## Account with SignerMultisig with ERC7739 upgradeable uups > Snapshot 1 @@ -3617,17 +3783,32 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC7739", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3638,7 +3819,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC721Holder upgradeable uups +## Account with SignerMultisig with ERC721Holder upgradeable uups > Snapshot 1 @@ -3651,17 +3832,32 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC721Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3672,7 +3868,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC1155Holder upgradeable uups +## Account with SignerMultisig with ERC1155Holder upgradeable uups > Snapshot 1 @@ -3685,17 +3881,32 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC1155Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3706,7 +3917,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC721Holder and ERC1155Holder upgradeable uups +## Account with SignerMultisig with ERC721Holder and ERC1155Holder upgradeable uups > Snapshot 1 @@ -3720,19 +3931,34 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3743,7 +3969,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7821 Execution upgradeable uups +## Account with SignerMultisig with ERC7821 Execution upgradeable uups > Snapshot 1 @@ -3756,17 +3982,32 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC7821, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC7821, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ @@ -3786,7 +4027,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 upgradeable uups +## Account with SignerMultisig with ERC7579 upgradeable uups > Snapshot 1 @@ -3800,19 +4041,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3826,6 +4070,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -3843,14 +4099,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3858,7 +4114,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC1271 upgradeable uups +## Account with SignerMultisig with ERC7579 with ERC1271 upgradeable uups > Snapshot 1 @@ -3871,28 +4127,43 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ - function _authorizeUpgrade(address newImplementation)␊ - internal␊ - override␊ - onlyEntryPointOrSelf␊ - {}␊ - ␊ - // The following functions are overrides required by Solidity.␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ ␊ function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ internal␊ @@ -3911,14 +4182,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3926,7 +4197,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC7739 upgradeable uups +## Account with SignerMultisig with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -3940,19 +4211,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3966,6 +4240,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -3983,14 +4269,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3998,7 +4284,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 hooks upgradeable uups +## Account with SignerMultisig with ERC7579 hooks upgradeable uups > Snapshot 1 @@ -4013,19 +4299,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579Hooked_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4039,6 +4328,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -4056,14 +4357,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4071,7 +4372,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 named upgradeable transparent +## Account with SignerMultisig named upgradeable transparent > Snapshot 1 @@ -4083,21 +4384,36 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable {␊ + contract CustomAccountWithSignerMultisig is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisig", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC1271 upgradeable transparent +## Account with SignerMultisig with ERC1271 upgradeable transparent > Snapshot 1 @@ -4108,16 +4424,19 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable {␊ + contract CustomAccountWithSignerMultisigERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4128,10 +4447,22 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC7739 upgradeable transparent +## Account with SignerMultisig with ERC7739 upgradeable transparent > Snapshot 1 @@ -4143,21 +4474,36 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable {␊ + contract CustomAccountWithSignerMultisigERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC7739", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC721Holder upgradeable transparent +## Account with SignerMultisig with ERC721Holder upgradeable transparent > Snapshot 1 @@ -4170,21 +4516,36 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder {␊ + contract CustomAccountWithSignerMultisigERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC721Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC1155Holder upgradeable transparent +## Account with SignerMultisig with ERC1155Holder upgradeable transparent > Snapshot 1 @@ -4197,21 +4558,36 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC1155Holder {␊ + contract CustomAccountWithSignerMultisigERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC1155Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC721Holder and ERC1155Holder upgradeable transparent +## Account with SignerMultisig with ERC721Holder and ERC1155Holder upgradeable transparent > Snapshot 1 @@ -4225,23 +4601,38 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, ERC1155Holder {␊ + contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC7821 Execution upgradeable transparent +## Account with SignerMultisig with ERC7821 Execution upgradeable transparent > Snapshot 1 @@ -4254,17 +4645,32 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC7821 {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC7821 {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ - }␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -4277,7 +4683,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 upgradeable transparent +## Account with SignerMultisig with ERC7579 upgradeable transparent > Snapshot 1 @@ -4291,18 +4697,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4316,6 +4725,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4327,14 +4748,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4342,7 +4763,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC1271 upgradeable transparent +## Account with SignerMultisig with ERC7579 with ERC1271 upgradeable transparent > Snapshot 1 @@ -4355,18 +4776,33 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ @@ -4388,14 +4824,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4403,7 +4839,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC7739 upgradeable transparent +## Account with SignerMultisig with ERC7579 with ERC7739 upgradeable transparent > Snapshot 1 @@ -4417,18 +4853,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4442,6 +4881,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4453,14 +4904,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4468,7 +4919,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 hooks upgradeable transparent +## Account with SignerMultisig with ERC7579 hooks upgradeable transparent > Snapshot 1 @@ -4483,18 +4934,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579Hooked_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4508,6 +4962,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4519,14 +4985,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4534,7 +5000,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA named non-upgradeable +## Account with SignerMultisigWeighted named non-upgradeable > Snapshot 1 @@ -4545,17 +5011,36 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSA is Account, EIP712, ERC7739, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSA", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeighted is Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeighted", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC1271 non-upgradeable +## Account with SignerMultisigWeighted with ERC1271 non-upgradeable > Snapshot 1 @@ -4565,10 +5050,12 @@ Generated by [AVA](https://avajs.dev). ␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1271 is Account, IERC1271, SignerRSA {␊ - constructor(bytes memory e, bytes memory n) SignerRSA(e, n) {}␊ + contract CustomAccountWithSignerMultisigWeightedERC1271 is Account, IERC1271, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ + {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ public␊ @@ -4578,10 +5065,29 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC7739 non-upgradeable +## Account with SignerMultisigWeighted with ERC7739 non-upgradeable > Snapshot 1 @@ -4592,17 +5098,36 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC7739 is Account, EIP712, ERC7739, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSAERC7739", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeightedERC7739 is Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC721Holder non-upgradeable +## Account with SignerMultisigWeighted with ERC721Holder non-upgradeable > Snapshot 1 @@ -4614,39 +5139,77 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721Holder is Account, EIP712, ERC7739, SignerRSA, ERC721Holder {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSAERC721Holder", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeightedERC721Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ - }␊ - ` - -## Account with SignerRSA with ERC1155Holder non-upgradeable - -> Snapshot 1 - - `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.5.0␊ - pragma solidity ^0.8.27;␊ ␊ - import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC1155Holder non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1155Holder is Account, EIP712, ERC7739, SignerRSA, ERC1155Holder {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSAERC1155Holder", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC1155Holder {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC721Holder and ERC1155Holder non-upgradeable +## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder non-upgradeable > Snapshot 1 @@ -4659,17 +5222,36 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerRSA, ERC721Holder, ERC1155Holder {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder, ERC1155Holder {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC7821 Execution non-upgradeable +## Account with SignerMultisigWeighted with ERC7821 Execution non-upgradeable > Snapshot 1 @@ -4681,13 +5263,32 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, SignerRSA, ERC7821 {␊ - constructor(bytes memory e, bytes memory n)␊ + contract MyAccount is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC7821 {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerRSA(e, n)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -4700,7 +5301,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 non-upgradeable +## Account with SignerMultisigWeighted with ERC7579 non-upgradeable > Snapshot 1 @@ -4713,13 +5314,14 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerRSA(e, n)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4733,6 +5335,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4744,14 +5365,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSA, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4759,7 +5380,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC1271 non-upgradeable +## Account with SignerMultisigWeighted with ERC7579 with ERC1271 non-upgradeable > Snapshot 1 @@ -4771,11 +5392,33 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, IERC1271, AccountERC7579, SignerRSA {␊ - constructor(bytes memory e, bytes memory n) SignerRSA(e, n) {}␊ + contract MyAccount is Account, IERC1271, AccountERC7579, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ + {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4796,14 +5439,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSA, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4811,7 +5454,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC7739 non-upgradeable +## Account with SignerMultisigWeighted with ERC7579 with ERC7739 non-upgradeable > Snapshot 1 @@ -4824,13 +5467,14 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerRSA(e, n)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4844,6 +5488,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4855,14 +5518,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSA, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4870,7 +5533,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 hooks non-upgradeable +## Account with SignerMultisigWeighted with ERC7579 hooks non-upgradeable > Snapshot 1 @@ -4884,13 +5547,14 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerRSA(e, n)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4905,24 +5569,43 @@ Generated by [AVA](https://avajs.dev). return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ - // The following functions are overrides required by Solidity.␊ - ␊ - function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ - internal␊ - override(Account, AccountERC7579)␊ - returns (uint256)␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ {␊ - return super._validateUserOp(userOp, userOpHash, signature);␊ + _setSignerWeights(signers, weights);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ - // to ensure the correct order of function resolution.␊ - // AccountERC7579 returns false for _rawSignatureValidation␊ - function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ - internal␊ - view␊ - override(SignerRSA, AbstractSigner, AccountERC7579)␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4930,7 +5613,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA named upgradeable uups +## Account with SignerMultisigWeighted named upgradeable uups > Snapshot 1 @@ -4942,17 +5625,39 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSA is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeighted is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSA", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigWeighted", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -4963,7 +5668,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC1271 upgradeable uups +## Account with SignerMultisigWeighted with ERC1271 upgradeable uups > Snapshot 1 @@ -4974,17 +5679,20 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1271 is Initializable, Account, IERC1271, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4995,6 +5703,25 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -5004,7 +5731,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7739 upgradeable uups +## Account with SignerMultisigWeighted with ERC7739 upgradeable uups > Snapshot 1 @@ -5016,17 +5743,41 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC7739", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5037,7 +5788,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC721Holder upgradeable uups +## Account with SignerMultisigWeighted with ERC721Holder upgradeable uups > Snapshot 1 @@ -5050,17 +5801,41 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC721Holder", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5071,7 +5846,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC1155Holder upgradeable uups +## Account with SignerMultisigWeighted with ERC1155Holder upgradeable uups > Snapshot 1 @@ -5084,17 +5859,41 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC1155Holder", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5105,7 +5904,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC721Holder and ERC1155Holder upgradeable uups +## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder upgradeable uups > Snapshot 1 @@ -5119,19 +5918,41 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5142,7 +5963,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7821 Execution upgradeable uups +## Account with SignerMultisigWeighted with ERC7821 Execution upgradeable uups > Snapshot 1 @@ -5155,23 +5976,45 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC7821, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC7821, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ - function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ - internal␊ - view␊ - override␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ returns (bool)␊ {␊ return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ @@ -5185,7 +6028,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 upgradeable uups +## Account with SignerMultisigWeighted with ERC7579 upgradeable uups > Snapshot 1 @@ -5199,19 +6042,23 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5225,6 +6072,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -5242,14 +6108,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5257,7 +6123,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC1271 upgradeable uups +## Account with SignerMultisigWeighted with ERC7579 with ERC1271 upgradeable uups > Snapshot 1 @@ -5270,19 +6136,42 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5310,14 +6199,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5325,7 +6214,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC7739 upgradeable uups +## Account with SignerMultisigWeighted with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -5339,19 +6228,23 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5365,6 +6258,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -5382,14 +6294,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5397,7 +6309,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 hooks upgradeable uups +## Account with SignerMultisigWeighted with ERC7579 hooks upgradeable uups > Snapshot 1 @@ -5412,19 +6324,23 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579Hooked_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5438,6 +6354,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -5455,14 +6390,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5470,7 +6405,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA named upgradeable transparent +## Account with SignerMultisigWeighted named upgradeable transparent > Snapshot 1 @@ -5482,21 +6417,43 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSA is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeighted is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSA", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigWeighted", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC1271 upgradeable transparent +## Account with SignerMultisigWeighted with ERC1271 upgradeable transparent > Snapshot 1 @@ -5507,16 +6464,19 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1271 is Initializable, Account, IERC1271, SignerRSAUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5527,10 +6487,29 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC7739 upgradeable transparent +## Account with SignerMultisigWeighted with ERC7739 upgradeable transparent > Snapshot 1 @@ -5542,21 +6521,45 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC7739", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC721Holder upgradeable transparent +## Account with SignerMultisigWeighted with ERC721Holder upgradeable transparent > Snapshot 1 @@ -5569,21 +6572,45 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder {␊ + contract CustomAccountWithSignerMultisigWeightedERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC721Holder", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC1155Holder upgradeable transparent +## Account with SignerMultisigWeighted with ERC1155Holder upgradeable transparent > Snapshot 1 @@ -5596,21 +6623,45 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC1155Holder {␊ + contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC1155Holder", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC721Holder and ERC1155Holder upgradeable transparent +## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder upgradeable transparent > Snapshot 1 @@ -5624,23 +6675,45 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, ERC1155Holder {␊ + contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC7821 Execution upgradeable transparent +## Account with SignerMultisigWeighted with ERC7821 Execution upgradeable transparent > Snapshot 1 @@ -5653,16 +6726,38 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC7821 {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC7821 {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ @@ -5676,7 +6771,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 upgradeable transparent +## Account with SignerMultisigWeighted with ERC7579 upgradeable transparent > Snapshot 1 @@ -5690,18 +6785,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5715,6 +6814,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -5726,14 +6844,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5741,7 +6859,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC1271 upgradeable transparent +## Account with SignerMultisigWeighted with ERC7579 with ERC1271 upgradeable transparent > Snapshot 1 @@ -5754,18 +6872,41 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ @@ -5787,14 +6928,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5802,7 +6943,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC7739 upgradeable transparent +## Account with SignerMultisigWeighted with ERC7579 with ERC7739 upgradeable transparent > Snapshot 1 @@ -5816,18 +6957,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5842,7 +6987,26 @@ Generated by [AVA](https://avajs.dev). return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ - // The following functions are overrides required by Solidity.␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ ␊ function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ internal␊ @@ -5852,14 +7016,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5867,7 +7031,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 hooks upgradeable transparent +## Account with SignerMultisigWeighted with ERC7579 hooks upgradeable transparent > Snapshot 1 @@ -5882,18 +7046,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerRSAUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579Hooked_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5907,6 +7075,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -5918,14 +7105,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5933,7 +7120,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig named non-upgradeable +## Account with SignerP256 named non-upgradeable > Snapshot 1 @@ -5944,29 +7131,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisig is Account, EIP712, ERC7739, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisig", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256 is Account, EIP712, ERC7739, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC1271 non-upgradeable +## Account with SignerP256 with ERC1271 non-upgradeable > Snapshot 1 @@ -5976,12 +7151,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1271 is Account, IERC1271, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - MultiSignerERC7913(signers, threshold)␊ - {}␊ + contract CustomAccountWithSignerP256ERC1271 is Account, IERC1271, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ public␊ @@ -5991,22 +7164,10 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC7739 non-upgradeable +## Account with SignerP256 with ERC7739 non-upgradeable > Snapshot 1 @@ -6017,29 +7178,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC7739 is Account, EIP712, ERC7739, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigERC7739", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256ERC7739 is Account, EIP712, ERC7739, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256ERC7739", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC721Holder non-upgradeable +## Account with SignerP256 with ERC721Holder non-upgradeable > Snapshot 1 @@ -6051,29 +7200,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigERC721Holder", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256ERC721Holder is Account, EIP712, ERC7739, SignerP256, ERC721Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256ERC721Holder", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC1155Holder non-upgradeable +## Account with SignerP256 with ERC1155Holder non-upgradeable > Snapshot 1 @@ -6085,29 +7222,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC1155Holder {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigERC1155Holder", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256ERC1155Holder is Account, EIP712, ERC7739, SignerP256, ERC1155Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256ERC1155Holder", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC721Holder and ERC1155Holder non-upgradeable +## Account with SignerP256 with ERC721Holder and ERC1155Holder non-upgradeable > Snapshot 1 @@ -6120,29 +7245,17 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder, ERC1155Holder {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerP256, ERC721Holder, ERC1155Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC7821 Execution non-upgradeable +## Account with SignerP256 with ERC7821 Execution non-upgradeable > Snapshot 1 @@ -6154,25 +7267,13 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, MultiSignerERC7913, ERC7821 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, SignerP256, ERC7821 {␊ + constructor(bytes32 qx, bytes32 qy)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -6185,7 +7286,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 non-upgradeable +## Account with SignerP256 with ERC7579 non-upgradeable > Snapshot 1 @@ -6198,13 +7299,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + SignerP256(qx, qy)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6218,18 +7319,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -6241,14 +7330,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ + // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6256,7 +7345,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC1271 non-upgradeable +## Account with SignerP256 with ERC7579 with ERC1271 non-upgradeable > Snapshot 1 @@ -6268,25 +7357,11 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, IERC1271, AccountERC7579, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - MultiSignerERC7913(signers, threshold)␊ - {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ + contract MyAccount is Account, IERC1271, AccountERC7579, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -6307,14 +7382,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ + // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6322,7 +7397,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC7739 non-upgradeable +## Account with SignerP256 with ERC7579 with ERC7739 non-upgradeable > Snapshot 1 @@ -6335,13 +7410,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + SignerP256(qx, qy)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6355,18 +7430,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -6378,14 +7441,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ + // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6393,7 +7456,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 hooks non-upgradeable +## Account with SignerP256 with ERC7579 hooks non-upgradeable > Snapshot 1 @@ -6407,13 +7470,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + SignerP256(qx, qy)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6427,18 +7490,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -6450,14 +7501,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ + // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6465,7 +7516,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig named upgradeable uups +## Account with SignerP256 named upgradeable uups > Snapshot 1 @@ -6477,32 +7528,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisig is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisig", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6513,7 +7549,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC1271 upgradeable uups +## Account with SignerP256 with ERC1271 upgradeable uups > Snapshot 1 @@ -6524,20 +7560,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6548,18 +7581,6 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -6569,7 +7590,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7739 upgradeable uups +## Account with SignerP256 with ERC7739 upgradeable uups > Snapshot 1 @@ -6581,32 +7602,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC7739", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6617,7 +7623,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC721Holder upgradeable uups +## Account with SignerP256 with ERC721Holder upgradeable uups > Snapshot 1 @@ -6630,32 +7636,17 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC721Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6666,7 +7657,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC1155Holder upgradeable uups +## Account with SignerP256 with ERC1155Holder upgradeable uups > Snapshot 1 @@ -6679,32 +7670,17 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC1155Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6715,7 +7691,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC721Holder and ERC1155Holder upgradeable uups +## Account with SignerP256 with ERC721Holder and ERC1155Holder upgradeable uups > Snapshot 1 @@ -6729,34 +7705,19 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6767,7 +7728,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7821 Execution upgradeable uups +## Account with SignerP256 with ERC7821 Execution upgradeable uups > Snapshot 1 @@ -6780,32 +7741,17 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC7821, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC7821, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ @@ -6825,7 +7771,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 upgradeable uups +## Account with SignerP256 with ERC7579 upgradeable uups > Snapshot 1 @@ -6839,22 +7785,19 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6868,18 +7811,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -6897,14 +7828,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6912,7 +7843,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC1271 upgradeable uups +## Account with SignerP256 with ERC7579 with ERC1271 upgradeable uups > Snapshot 1 @@ -6925,34 +7856,19 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6980,14 +7896,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6995,7 +7911,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC7739 upgradeable uups +## Account with SignerP256 with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -7009,22 +7925,19 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7038,18 +7951,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -7067,14 +7968,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7082,7 +7983,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 hooks upgradeable uups +## Account with SignerP256 with ERC7579 hooks upgradeable uups > Snapshot 1 @@ -7097,22 +7998,19 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579Hooked_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7126,18 +8024,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -7155,14 +8041,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7170,7 +8056,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig named upgradeable transparent +## Account with SignerP256 named upgradeable transparent > Snapshot 1 @@ -7182,36 +8068,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisig is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable {␊ + contract CustomAccountWithSignerP256 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisig", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC1271 upgradeable transparent +## Account with SignerP256 with ERC1271 upgradeable transparent > Snapshot 1 @@ -7222,19 +8093,16 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913Upgradeable {␊ + contract CustomAccountWithSignerP256ERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7245,22 +8113,10 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC7739 upgradeable transparent +## Account with SignerP256 with ERC7739 upgradeable transparent > Snapshot 1 @@ -7272,36 +8128,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable {␊ + contract CustomAccountWithSignerP256ERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC7739", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC721Holder upgradeable transparent +## Account with SignerP256 with ERC721Holder upgradeable transparent > Snapshot 1 @@ -7314,36 +8155,21 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder {␊ + contract CustomAccountWithSignerP256ERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC721Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC1155Holder upgradeable transparent +## Account with SignerP256 with ERC1155Holder upgradeable transparent > Snapshot 1 @@ -7356,36 +8182,21 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC1155Holder {␊ + contract CustomAccountWithSignerP256ERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC1155Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC721Holder and ERC1155Holder upgradeable transparent +## Account with SignerP256 with ERC721Holder and ERC1155Holder upgradeable transparent > Snapshot 1 @@ -7399,38 +8210,23 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, ERC1155Holder {␊ + contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC7821 Execution upgradeable transparent +## Account with SignerP256 with ERC7821 Execution upgradeable transparent > Snapshot 1 @@ -7443,31 +8239,16 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC7821 {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC7821 {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ @@ -7481,7 +8262,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 upgradeable transparent +## Account with SignerP256 with ERC7579 upgradeable transparent > Snapshot 1 @@ -7495,21 +8276,18 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7523,18 +8301,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -7546,14 +8312,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7561,7 +8327,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC1271 upgradeable transparent +## Account with SignerP256 with ERC7579 with ERC1271 upgradeable transparent > Snapshot 1 @@ -7574,33 +8340,18 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ @@ -7622,14 +8373,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7637,7 +8388,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC7739 upgradeable transparent +## Account with SignerP256 with ERC7579 with ERC7739 upgradeable transparent > Snapshot 1 @@ -7651,21 +8402,18 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7679,18 +8427,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -7702,14 +8438,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7717,7 +8453,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 hooks upgradeable transparent +## Account with SignerP256 with ERC7579 hooks upgradeable transparent > Snapshot 1 @@ -7732,21 +8468,18 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579Hooked_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7760,18 +8493,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -7783,14 +8504,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7798,7 +8519,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted named non-upgradeable +## Account with SignerRSA named non-upgradeable > Snapshot 1 @@ -7809,36 +8530,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeighted is Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeighted", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSA is Account, EIP712, ERC7739, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSA", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC1271 non-upgradeable +## Account with SignerRSA with ERC1271 non-upgradeable > Snapshot 1 @@ -7848,12 +8550,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1271 is Account, IERC1271, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ - {}␊ + contract CustomAccountWithSignerRSAERC1271 is Account, IERC1271, SignerRSA {␊ + constructor(bytes memory e, bytes memory n) SignerRSA(e, n) {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ public␊ @@ -7863,29 +8563,10 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7739 non-upgradeable +## Account with SignerRSA with ERC7739 non-upgradeable > Snapshot 1 @@ -7896,36 +8577,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC7739 is Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSAERC7739 is Account, EIP712, ERC7739, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSAERC7739", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder non-upgradeable +## Account with SignerRSA with ERC721Holder non-upgradeable > Snapshot 1 @@ -7937,36 +8599,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSAERC721Holder is Account, EIP712, ERC7739, SignerRSA, ERC721Holder {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSAERC721Holder", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC1155Holder non-upgradeable +## Account with SignerRSA with ERC1155Holder non-upgradeable > Snapshot 1 @@ -7978,36 +8621,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC1155Holder {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSAERC1155Holder is Account, EIP712, ERC7739, SignerRSA, ERC1155Holder {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSAERC1155Holder", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder non-upgradeable +## Account with SignerRSA with ERC721Holder and ERC1155Holder non-upgradeable > Snapshot 1 @@ -8020,36 +8644,17 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder, ERC1155Holder {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerRSA, ERC721Holder, ERC1155Holder {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7821 Execution non-upgradeable +## Account with SignerRSA with ERC7821 Execution non-upgradeable > Snapshot 1 @@ -8061,32 +8666,13 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC7821 {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, SignerRSA, ERC7821 {␊ + constructor(bytes memory e, bytes memory n)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -8099,7 +8685,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 non-upgradeable +## Account with SignerRSA with ERC7579 non-upgradeable > Snapshot 1 @@ -8112,14 +8698,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + SignerRSA(e, n)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8133,25 +8718,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -8163,14 +8729,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8178,7 +8744,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC1271 non-upgradeable +## Account with SignerRSA with ERC7579 with ERC1271 non-upgradeable > Snapshot 1 @@ -8190,33 +8756,11 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, IERC1271, AccountERC7579, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ - {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ + contract MyAccount is Account, IERC1271, AccountERC7579, SignerRSA {␊ + constructor(bytes memory e, bytes memory n) SignerRSA(e, n) {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -8237,14 +8781,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8252,7 +8796,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC7739 non-upgradeable +## Account with SignerRSA with ERC7579 with ERC7739 non-upgradeable > Snapshot 1 @@ -8265,14 +8809,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + SignerRSA(e, n)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8286,25 +8829,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -8316,14 +8840,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8331,7 +8855,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 hooks non-upgradeable +## Account with SignerRSA with ERC7579 hooks non-upgradeable > Snapshot 1 @@ -8345,14 +8869,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + SignerRSA(e, n)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8366,25 +8889,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -8396,14 +8900,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8411,7 +8915,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted named upgradeable uups +## Account with SignerRSA named upgradeable uups > Snapshot 1 @@ -8423,39 +8927,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeighted is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSA is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigWeighted", "1") {␊ + constructor() EIP712("CustomAccount with SignerRSA", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8466,7 +8948,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC1271 upgradeable uups +## Account with SignerRSA with ERC1271 upgradeable uups > Snapshot 1 @@ -8477,20 +8959,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC1271 is Initializable, Account, IERC1271, SignerRSAUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8501,25 +8980,6 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -8529,7 +8989,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7739 upgradeable uups +## Account with SignerRSA with ERC7739 upgradeable uups > Snapshot 1 @@ -8541,41 +9001,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerRSAERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8586,7 +9022,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder upgradeable uups +## Account with SignerRSA with ERC721Holder upgradeable uups > Snapshot 1 @@ -8599,41 +9035,17 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerRSAERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8644,7 +9056,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC1155Holder upgradeable uups +## Account with SignerRSA with ERC1155Holder upgradeable uups > Snapshot 1 @@ -8657,41 +9069,17 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerRSAERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8702,7 +9090,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder upgradeable uups +## Account with SignerRSA with ERC721Holder and ERC1155Holder upgradeable uups > Snapshot 1 @@ -8716,41 +9104,19 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8761,7 +9127,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7821 Execution upgradeable uups +## Account with SignerRSA with ERC7821 Execution upgradeable uups > Snapshot 1 @@ -8774,48 +9140,134 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC7821, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC7821, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ {␊ - _setSignerWeights(signers, weights);␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ }␊ ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ }␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ - function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + function _authorizeUpgrade(address newImplementation)␊ internal␊ - view␊ override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ - return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 with ERC1271 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8823,10 +9275,42 @@ Generated by [AVA](https://avajs.dev). override␊ onlyEntryPointOrSelf␊ {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579Upgradeable)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7579 upgradeable uups +## Account with SignerRSA with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -8840,23 +9324,19 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8871,23 +9351,1458 @@ Generated by [AVA](https://avajs.dev). return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ {␊ - _setSignerWeights(signers, weights);␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 hooks upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {AccountERC7579HookedUpgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579HookedUpgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ }␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579Hooked_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA named upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSA is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerRSA", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC1271 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC1271 is Initializable, Account, IERC1271, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7739 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerRSAERC7739", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC721Holder upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerRSAERC721Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC1155Holder upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC1155Holder {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerRSAERC1155Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC721Holder and ERC1155Holder upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, ERC1155Holder {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor()␊ + EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7821 Execution upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC7821 {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 with ERC1271 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579Upgradeable)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 with ERC7739 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 hooks upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {AccountERC7579HookedUpgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579HookedUpgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579Hooked_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn named non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthn is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthn", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC1271 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC1271 is Account, IERC1271, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7739 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC7739 is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthnERC7739", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC721Holder non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC721Holder is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn, ERC721Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthnERC721Holder", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC1155Holder non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC1155Holder is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn, ERC1155Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthnERC1155Holder", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC721Holder and ERC1155Holder non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn, ERC721Holder, ERC1155Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthnERC721HolderERC1155Holder", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7821 Execution non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn, ERC7821 {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("MyAccount", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("MyAccount", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerWebAuthn is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerWebAuthn)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 with ERC1271 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, IERC1271, AccountERC7579, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerWebAuthn is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerWebAuthn)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 with ERC7739 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("MyAccount", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerWebAuthn is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerWebAuthn)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 hooks non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ + import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("MyAccount", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerWebAuthn is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerWebAuthn)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn named upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthn is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerWebAuthn", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC1271 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7739 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC7739", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC721Holder upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC721Holder, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC721Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC1155Holder upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC1155Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC721Holder and ERC1155Holder upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor()␊ + EIP712("CustomAccount with SignerWebAuthnERC721HolderERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7821 Execution upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC7821, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __AccountERC7579_init();␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8906,14 +10821,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8921,7 +10836,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC1271 upgradeable uups +## Account with SignerWebAuthn with ERC7579 with ERC1271 upgradeable uups > Snapshot 1 @@ -8934,42 +10849,21 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8997,14 +10891,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9012,7 +10906,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC7739 upgradeable uups +## Account with SignerWebAuthn with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -9026,23 +10920,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9056,25 +10948,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -9092,14 +10965,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9107,7 +10980,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 hooks upgradeable uups +## Account with SignerWebAuthn with ERC7579 hooks upgradeable uups > Snapshot 1 @@ -9122,23 +10995,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579Hooked_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9152,25 +11023,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -9188,14 +11040,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9203,7 +11055,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted named upgradeable transparent +## Account with SignerWebAuthn named upgradeable transparent > Snapshot 1 @@ -9211,47 +11063,39 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeighted is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable {␊ + contract CustomAccountWithSignerWebAuthn is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigWeighted", "1") {␊ + constructor() EIP712("CustomAccount with SignerWebAuthn", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC1271 upgradeable transparent +## Account with SignerWebAuthn with ERC1271 upgradeable transparent > Snapshot 1 @@ -9259,22 +11103,22 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913WeightedUpgradeable {␊ + contract CustomAccountWithSignerWebAuthnERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9286,28 +11130,20 @@ Generated by [AVA](https://avajs.dev). return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7739 upgradeable transparent +## Account with SignerWebAuthn with ERC7739 upgradeable transparent > Snapshot 1 @@ -9315,49 +11151,39 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable {␊ + contract CustomAccountWithSignerWebAuthnERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder upgradeable transparent +## Account with SignerWebAuthn with ERC721Holder upgradeable transparent > Snapshot 1 @@ -9365,50 +11191,40 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder {␊ + contract CustomAccountWithSignerWebAuthnERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC721Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC1155Holder upgradeable transparent +## Account with SignerWebAuthn with ERC1155Holder upgradeable transparent > Snapshot 1 @@ -9416,50 +11232,40 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC1155Holder {␊ + contract CustomAccountWithSignerWebAuthnERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder upgradeable transparent +## Account with SignerWebAuthn with ERC721Holder and ERC1155Holder upgradeable transparent > Snapshot 1 @@ -9467,51 +11273,43 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, ERC1155Holder {␊ + contract CustomAccountWithSignerWebAuthnERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC721Holder, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerWebAuthnERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7821 Execution upgradeable transparent +## Account with SignerWebAuthn with ERC7821 Execution upgradeable transparent > Snapshot 1 @@ -9519,57 +11317,49 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC7821 {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC7821 {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ }␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ returns (bool)␊ {␊ - return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7579 upgradeable transparent +## Account with SignerWebAuthn with ERC7579 upgradeable transparent > Snapshot 1 @@ -9583,22 +11373,20 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9612,25 +11400,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -9642,14 +11411,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9657,7 +11426,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC1271 upgradeable transparent +## Account with SignerWebAuthn with ERC7579 with ERC1271 upgradeable transparent > Snapshot 1 @@ -9670,41 +11439,20 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ @@ -9726,14 +11474,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9741,7 +11489,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC7739 upgradeable transparent +## Account with SignerWebAuthn with ERC7579 with ERC7739 upgradeable transparent > Snapshot 1 @@ -9755,22 +11503,20 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9784,25 +11530,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -9814,14 +11541,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9829,7 +11556,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 hooks upgradeable transparent +## Account with SignerWebAuthn with ERC7579 hooks upgradeable transparent > Snapshot 1 @@ -9844,22 +11571,20 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913WeightedUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579Hooked_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9873,25 +11598,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -9903,14 +11609,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ diff --git a/packages/core/solidity/src/account.test.ts.snap b/packages/core/solidity/src/account.test.ts.snap index 67e081549..c3a0f6d55 100644 Binary files a/packages/core/solidity/src/account.test.ts.snap and b/packages/core/solidity/src/account.test.ts.snap differ diff --git a/packages/core/solidity/src/account.ts b/packages/core/solidity/src/account.ts index 3687328fb..95d191b6c 100644 --- a/packages/core/solidity/src/account.ts +++ b/packages/core/solidity/src/account.ts @@ -247,12 +247,16 @@ function overrideRawSignatureValidation(c: ContractBuilder, opts: AccountOptions const signerBaseName = signers[opts.signer].name; const signerName = opts.upgradeable ? upgradeableName(signerBaseName) : signerBaseName; - c.addImportOnly({ - name: 'AbstractSigner', - path: '@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol', - transpiled: false, - }); - c.addOverride({ name: 'AbstractSigner', transpiled: false }, signerFunctions._rawSignatureValidation); + // WebAuthnSigner depends inherits from P256Signer, so the AbstractSigner override is handled by `addSigner` + if (opts.signer !== 'WebAuthn') { + c.addImportOnly({ + name: 'AbstractSigner', + path: '@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol', + transpiled: false, + }); + c.addOverride({ name: 'AbstractSigner', transpiled: false }, signerFunctions._rawSignatureValidation); + } + c.addOverride({ name: 'AccountERC7579' }, signerFunctions._rawSignatureValidation); c.setFunctionComments( [ diff --git a/packages/core/solidity/src/generate/account.ts b/packages/core/solidity/src/generate/account.ts index b1d082543..e92df43f9 100644 --- a/packages/core/solidity/src/generate/account.ts +++ b/packages/core/solidity/src/generate/account.ts @@ -8,7 +8,7 @@ const account = { signatureValidation: [false, 'ERC1271', 'ERC7739'] as const, ERC721Holder: [false, true] as const, ERC1155Holder: [false, true] as const, - signer: ['ECDSA', 'EIP7702', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const, + signer: ['ECDSA', 'EIP7702', 'Multisig', 'MultisigWeighted', 'P256', 'RSA', 'WebAuthn'] as const, batchedExecution: [false, true] as const, ERC7579Modules: [false, 'AccountERC7579', 'AccountERC7579Hooked'] as const, access: [false] as const, diff --git a/packages/core/solidity/src/signer.ts b/packages/core/solidity/src/signer.ts index 7d91f60cf..32140008e 100644 --- a/packages/core/solidity/src/signer.ts +++ b/packages/core/solidity/src/signer.ts @@ -3,7 +3,16 @@ import { OptionsError } from './error'; import type { Upgradeable } from './set-upgradeable'; import { defineFunctions } from './utils/define-functions'; -export const SignerOptions = [false, 'ECDSA', 'EIP7702', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const; +export const SignerOptions = [ + false, + 'ECDSA', + 'EIP7702', + 'Multisig', + 'MultisigWeighted', + 'P256', + 'RSA', + 'WebAuthn', +] as const; export type SignerOptions = (typeof SignerOptions)[number]; export function addSigner(c: ContractBuilder, signer: SignerOptions, upgradeable: Upgradeable): void { @@ -34,6 +43,26 @@ export function addSigner(c: ContractBuilder, signer: SignerOptions, upgradeable ); break; } + case 'WebAuthn': { + signerArgs.P256.forEach(arg => c.addConstructorArgument(arg)); + c.addParent( + signers.P256, + signerArgs.P256.map(arg => ({ lit: arg.name })), + ); + c.addParent(signers[signer]); + c.addImportOnly({ + name: 'AbstractSigner', + path: '@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol', + transpiled: false, + }); + c.addOverride({ name: 'AbstractSigner', transpiled: false }, signerFunctions._rawSignatureValidation); + c.addOverride({ name: 'SignerP256' }, signerFunctions._rawSignatureValidation); + break; + } + default: { + const _: never = signer; + throw new Error('Unknown signer'); + } } } @@ -46,6 +75,14 @@ export const signers = { name: 'SignerEIP7702', path: '@openzeppelin/contracts/utils/cryptography/signers/SignerEIP7702.sol', }, + Multisig: { + name: 'MultiSignerERC7913', + path: '@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol', + }, + MultisigWeighted: { + name: 'MultiSignerERC7913Weighted', + path: '@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol', + }, P256: { name: 'SignerP256', path: '@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol', @@ -54,13 +91,9 @@ export const signers = { name: 'SignerRSA', path: '@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol', }, - Multisig: { - name: 'MultiSignerERC7913', - path: '@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol', - }, - MultisigWeighted: { - name: 'MultiSignerERC7913Weighted', - path: '@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol', + WebAuthn: { + name: 'SignerWebAuthn', + path: '@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol', }, }; @@ -70,10 +103,6 @@ export const signerArgs: Record, { nam { name: 'qx', type: 'bytes32' }, { name: 'qy', type: 'bytes32' }, ], - RSA: [ - { name: 'e', type: 'bytes memory' }, - { name: 'n', type: 'bytes memory' }, - ], Multisig: [ { name: 'signers', type: 'bytes[] memory' }, { name: 'threshold', type: 'uint64' }, @@ -83,6 +112,11 @@ export const signerArgs: Record, { nam { name: 'weights', type: 'uint64[] memory' }, { name: 'threshold', type: 'uint64' }, ], + RSA: [ + { name: 'e', type: 'bytes memory' }, + { name: 'n', type: 'bytes memory' }, + ], + WebAuthn: [], }; export const signerFunctions = defineFunctions({ diff --git a/packages/mcp/src/solidity/schemas.ts b/packages/mcp/src/solidity/schemas.ts index 9fbe46e7d..6beeb1ff4 100644 --- a/packages/mcp/src/solidity/schemas.ts +++ b/packages/mcp/src/solidity/schemas.ts @@ -127,10 +127,11 @@ export const accountSchema = { .literal(false) .or(z.literal('ECDSA')) .or(z.literal('EIP7702')) - .or(z.literal('P256')) - .or(z.literal('RSA')) .or(z.literal('Multisig')) .or(z.literal('MultisigWeighted')) + .or(z.literal('P256')) + .or(z.literal('RSA')) + .or(z.literal('WebAuthn')) .optional() .describe(solidityAccountDescriptions.signer), batchedExecution: z.boolean().optional().describe(solidityAccountDescriptions.batchedExecution), diff --git a/packages/ui/api/ai-assistant/function-definitions/solidity.ts b/packages/ui/api/ai-assistant/function-definitions/solidity.ts index 33a088041..f47642064 100644 --- a/packages/ui/api/ai-assistant/function-definitions/solidity.ts +++ b/packages/ui/api/ai-assistant/function-definitions/solidity.ts @@ -211,7 +211,7 @@ export const solidityAccountAIFunctionDefinition = { signer: { anyOf: [ { type: 'boolean', enum: [false] }, - { type: 'string', enum: ['ECDSA', 'EIP7702', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] }, + { type: 'string', enum: ['ECDSA', 'EIP7702', 'P256', 'Multisig', 'MultisigWeighted', 'RSA', 'WebAuthn'] }, ], description: solidityAccountDescriptions.signer, }, diff --git a/packages/ui/src/solidity/AccountControls.svelte b/packages/ui/src/solidity/AccountControls.svelte index 74c262542..ae6e08b5f 100644 --- a/packages/ui/src/solidity/AccountControls.svelte +++ b/packages/ui/src/solidity/AccountControls.svelte @@ -216,6 +216,13 @@ hardware security modules that use RSA keys. +