diff --git a/.changeset/huge-ties-find.md b/.changeset/huge-ties-find.md new file mode 100644 index 000000000..5ffa27ba9 --- /dev/null +++ b/.changeset/huge-ties-find.md @@ -0,0 +1,5 @@ +--- +'@openzeppelin/wizard': patch +--- + +Fixed bug with incorrect names in generated comment for Multisig account. diff --git a/packages/core/solidity/src/account.test.ts.md b/packages/core/solidity/src/account.test.ts.md index 226805c38..2859db874 100644 --- a/packages/core/solidity/src/account.test.ts.md +++ b/packages/core/solidity/src/account.test.ts.md @@ -6241,8 +6241,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisig is most derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisig)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is most 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)␊ @@ -6307,8 +6307,8 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisig is most derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisig)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is most 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)␊ @@ -6378,8 +6378,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisig is most derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisig)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is most 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)␊ @@ -6450,8 +6450,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisig is most derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisig)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is most 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)␊ @@ -6897,8 +6897,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is most 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)␊ @@ -6980,8 +6980,8 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is most 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)␊ @@ -7067,8 +7067,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is most 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)␊ @@ -7155,8 +7155,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is most 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)␊ @@ -7546,8 +7546,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is most 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)␊ @@ -7622,8 +7622,8 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is most 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)␊ @@ -7702,8 +7702,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is most 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)␊ @@ -7783,8 +7783,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is most 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)␊ @@ -8163,8 +8163,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeighted is most derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisigWeighted)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is most 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)␊ @@ -8237,8 +8237,8 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeighted is most derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisigWeighted)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is most 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)␊ @@ -8316,8 +8316,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeighted is most derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisigWeighted)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is most 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)␊ @@ -8396,8 +8396,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeighted is most derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisigWeighted)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is most 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)␊ @@ -8906,8 +8906,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeightedUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigWeightedUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is most 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)␊ @@ -8997,8 +8997,8 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeightedUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigWeightedUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is most 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)␊ @@ -9092,8 +9092,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeightedUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigWeightedUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is most 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)␊ @@ -9188,8 +9188,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeightedUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigWeightedUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is most 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)␊ @@ -9642,8 +9642,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeightedUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigWeightedUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is most 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)␊ @@ -9726,8 +9726,8 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeightedUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigWeightedUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is most 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)␊ @@ -9814,8 +9814,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeightedUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigWeightedUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is most 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)␊ @@ -9903,8 +9903,8 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerMultisigWeightedUpgradeable is most derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerMultisigWeightedUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is most 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)␊ diff --git a/packages/core/solidity/src/account.test.ts.snap b/packages/core/solidity/src/account.test.ts.snap index be2118450..c47804a86 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 9d6071fb8..e28b16f63 100644 --- a/packages/core/solidity/src/account.ts +++ b/packages/core/solidity/src/account.ts @@ -244,7 +244,8 @@ function overrideRawSignatureValidation(c: ContractBuilder, opts: AccountOptions // Disambiguate between Signer and AccountERC7579 if (opts.signer && opts.ERC7579Modules) { const accountName = opts.upgradeable ? upgradeableName('AccountERC7579') : 'AccountERC7579'; - const signerName = opts.upgradeable ? upgradeableName(`Signer${opts.signer}`) : `Signer${opts.signer}`; + const signerBaseName = signers[opts.signer].name; + const signerName = opts.upgradeable ? upgradeableName(signerBaseName) : signerBaseName; c.addImportOnly({ name: 'AbstractSigner',