Merge branch 'master' into typo-fixes

This commit is contained in:
Hadrien Croubois
2025-07-01 10:16:52 +02:00
committed by GitHub
9 changed files with 465 additions and 69 deletions

View File

@ -66,6 +66,9 @@ abstract contract MultiSignerERC7913 is AbstractSigner {
/// @dev The `signer` is less than 20 bytes long.
error MultiSignerERC7913InvalidSigner(bytes signer);
/// @dev The `threshold` is zero.
error MultiSignerERC7913ZeroThreshold();
/// @dev The `threshold` is unreachable given the number of `signers`.
error MultiSignerERC7913UnreachableThreshold(uint64 signers, uint64 threshold);
@ -146,6 +149,7 @@ abstract contract MultiSignerERC7913 is AbstractSigner {
* * See {_validateReachableThreshold} for the threshold validation.
*/
function _setThreshold(uint64 newThreshold) internal virtual {
require(newThreshold > 0, MultiSignerERC7913ZeroThreshold());
_threshold = newThreshold;
_validateReachableThreshold();
emit ERC7913ThresholdSet(newThreshold);