diff --git a/src/SettlerIntent.sol b/src/SettlerIntent.sol index b5f78bb70..181447a0e 100644 --- a/src/SettlerIntent.sol +++ b/src/SettlerIntent.sol @@ -23,16 +23,18 @@ abstract contract SettlerIntent is Permit2PaymentIntent, SettlerMetaTxn { return super._msgSender(); } - // Solidity inheritance is so stupid - function _witnessTypeSuffix() internal pure virtual override(Permit2PaymentMetaTxn, Permit2PaymentIntent) returns (string memory) { - return super._witnessTypeSuffix(); - } - - function _hashSlippage(AllowedSlippage calldata slippage) + function _witnessTypeSuffix() internal pure - returns (bytes32 result) + virtual + // Solidity inheritance is so stupid + override(Permit2PaymentMetaTxn, Permit2PaymentIntent) + returns (string memory) { + return super._witnessTypeSuffix(); + } + + function _hashSlippage(AllowedSlippage calldata slippage) internal pure returns (bytes32 result) { // This function does not check for or clean any dirty bits that might // exist in `slippage`. We assume that `slippage` will be used elsewhere // in this context and that if there are dirty bits it will result in a diff --git a/src/SettlerMetaTxn.sol b/src/SettlerMetaTxn.sol index efdaa794f..78e7cccb6 100644 --- a/src/SettlerMetaTxn.sol +++ b/src/SettlerMetaTxn.sol @@ -121,11 +121,10 @@ abstract contract SettlerMetaTxn is Permit2PaymentMetaTxn, SettlerBase { return true; } - function _executeMetaTxn( - AllowedSlippage calldata slippage, - bytes[] calldata actions, - bytes calldata sig - ) internal returns (bool) { + function _executeMetaTxn(AllowedSlippage calldata slippage, bytes[] calldata actions, bytes calldata sig) + internal + returns (bool) + { require(actions.length != 0); { (bytes4 action, bytes calldata data) = actions.decodeCall(0); diff --git a/src/chains/Arbitrum.sol b/src/chains/Arbitrum.sol index 38b75e7f3..2358c3eb9 100644 --- a/src/chains/Arbitrum.sol +++ b/src/chains/Arbitrum.sol @@ -128,7 +128,13 @@ abstract contract ArbitrumMixin is FreeMemory, SettlerBase, MaverickV2, CurveTri contract ArbitrumSettler is Settler, ArbitrumMixin { constructor(bytes20 gitCommit) SettlerBase(gitCommit) {} - function _dispatchVIP(bytes4 action, bytes calldata data) internal virtual override DANGEROUS_freeMemory returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data) + internal + virtual + override + DANGEROUS_freeMemory + returns (bool) + { if (super._dispatchVIP(action, data)) { return true; } else if (action == ISettlerActions.MAVERICKV2_VIP.selector) { @@ -252,7 +258,12 @@ contract ArbitrumSettlerIntent is SettlerIntent, ArbitrumSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -260,7 +271,11 @@ contract ArbitrumSettlerIntent is SettlerIntent, ArbitrumSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(ArbitrumSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(ArbitrumSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Avalanche.sol b/src/chains/Avalanche.sol index 0c75d80db..310746874 100644 --- a/src/chains/Avalanche.sol +++ b/src/chains/Avalanche.sol @@ -149,7 +149,12 @@ contract SepoliSaettlerIntent is SettlerIntent, AvalancheSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -157,7 +162,11 @@ contract SepoliSaettlerIntent is SettlerIntent, AvalancheSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(AvalancheSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(AvalancheSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Base.sol b/src/chains/Base.sol index 0c6c3085d..9c7ab3c12 100644 --- a/src/chains/Base.sol +++ b/src/chains/Base.sol @@ -263,7 +263,12 @@ contract BaseSettlerIntent is SettlerIntent, BaseSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -271,7 +276,11 @@ contract BaseSettlerIntent is SettlerIntent, BaseSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(BaseSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(BaseSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Blast.sol b/src/chains/Blast.sol index 240549dd2..dfcd31273 100644 --- a/src/chains/Blast.sol +++ b/src/chains/Blast.sol @@ -200,7 +200,12 @@ contract BlastSettlerIntent is SettlerIntent, BlastSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -208,7 +213,11 @@ contract BlastSettlerIntent is SettlerIntent, BlastSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(BlastSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(BlastSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Bnb.sol b/src/chains/Bnb.sol index 47a9ebeb7..0deb59b21 100644 --- a/src/chains/Bnb.sol +++ b/src/chains/Bnb.sol @@ -203,7 +203,12 @@ contract BnbSettlerIntent is SettlerIntent, BnbSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -211,7 +216,11 @@ contract BnbSettlerIntent is SettlerIntent, BnbSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(BnbSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(BnbSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Linea.sol b/src/chains/Linea.sol index 2e5428440..26b3ad1d2 100644 --- a/src/chains/Linea.sol +++ b/src/chains/Linea.sol @@ -153,7 +153,12 @@ contract LineaSettlerIntent is SettlerIntent, LineaSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -161,7 +166,11 @@ contract LineaSettlerIntent is SettlerIntent, LineaSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(LineaSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(LineaSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Mainnet.sol b/src/chains/Mainnet.sol index c61f97c97..4540fcf90 100644 --- a/src/chains/Mainnet.sol +++ b/src/chains/Mainnet.sol @@ -246,7 +246,12 @@ contract MainnetSettlerIntent is SettlerIntent, MainnetSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -254,7 +259,11 @@ contract MainnetSettlerIntent is SettlerIntent, MainnetSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(MainnetSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(MainnetSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Mantle.sol b/src/chains/Mantle.sol index bd29dbfca..0bb9574ed 100644 --- a/src/chains/Mantle.sol +++ b/src/chains/Mantle.sol @@ -131,7 +131,12 @@ contract MantleSettlerIntent is SettlerIntent, MantleSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -139,7 +144,11 @@ contract MantleSettlerIntent is SettlerIntent, MantleSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(MantleSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(MantleSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Optimism.sol b/src/chains/Optimism.sol index 90403da79..b8f80d1a5 100644 --- a/src/chains/Optimism.sol +++ b/src/chains/Optimism.sol @@ -155,7 +155,12 @@ contract OptimismSettlerIntent is SettlerIntent, OptimismSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -163,7 +168,11 @@ contract OptimismSettlerIntent is SettlerIntent, OptimismSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(OptimismSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(OptimismSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Polygon.sol b/src/chains/Polygon.sol index 2efd0f2f5..5f47418aa 100644 --- a/src/chains/Polygon.sol +++ b/src/chains/Polygon.sol @@ -155,7 +155,12 @@ contract PolygonSettlerIntent is SettlerIntent, PolygonSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -163,7 +168,11 @@ contract PolygonSettlerIntent is SettlerIntent, PolygonSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(PolygonSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(PolygonSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Scroll.sol b/src/chains/Scroll.sol index 7c37e5bbb..ad021628e 100644 --- a/src/chains/Scroll.sol +++ b/src/chains/Scroll.sol @@ -203,7 +203,12 @@ contract ScrollSettlerIntent is SettlerIntent, ScrollSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -211,7 +216,11 @@ contract ScrollSettlerIntent is SettlerIntent, ScrollSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(ScrollSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(ScrollSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/chains/Sepolia.sol b/src/chains/Sepolia.sol index 8556776e4..234d367f1 100644 --- a/src/chains/Sepolia.sol +++ b/src/chains/Sepolia.sol @@ -182,7 +182,12 @@ contract SepoliaSettlerIntent is SettlerIntent, SepoliaSettlerMetaTxn { return super._msgSender(); } - function _witnessTypeSuffix() internal pure override(SettlerIntent, Permit2PaymentMetaTxn) returns (string memory) { + function _witnessTypeSuffix() + internal + pure + override(SettlerIntent, Permit2PaymentMetaTxn) + returns (string memory) + { return super._witnessTypeSuffix(); } @@ -190,7 +195,11 @@ contract SepoliaSettlerIntent is SettlerIntent, SepoliaSettlerMetaTxn { return super._tokenId(); } - function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) internal override(SepoliaSettlerMetaTxn, SettlerMetaTxn) returns (bool) { + function _dispatchVIP(bytes4 action, bytes calldata data, bytes calldata sig) + internal + override(SepoliaSettlerMetaTxn, SettlerMetaTxn) + returns (bool) + { return super._dispatchVIP(action, data, sig); } } diff --git a/src/core/Permit2Payment.sol b/src/core/Permit2Payment.sol index 6bced4892..503fbf672 100644 --- a/src/core/Permit2Payment.sol +++ b/src/core/Permit2Payment.sol @@ -369,7 +369,9 @@ abstract contract Permit2PaymentMetaTxn is Context, Permit2Payment { function _witnessTypeSuffix() internal pure virtual returns (string memory) { return string( - abi.encodePacked("SlippageAndActions slippageAndActions)", SLIPPAGE_AND_ACTIONS_TYPE, TOKEN_PERMISSIONS_TYPE) + abi.encodePacked( + "SlippageAndActions slippageAndActions)", SLIPPAGE_AND_ACTIONS_TYPE, TOKEN_PERMISSIONS_TYPE + ) ); } @@ -413,8 +415,6 @@ abstract contract Permit2PaymentMetaTxn is Context, Permit2Payment { abstract contract Permit2PaymentIntent is Permit2PaymentMetaTxn { function _witnessTypeSuffix() internal pure virtual override returns (string memory) { - return string( - abi.encodePacked("Slippage slippage)", SLIPPAGE_TYPE, TOKEN_PERMISSIONS_TYPE) - ); + return string(abi.encodePacked("Slippage slippage)", SLIPPAGE_TYPE, TOKEN_PERMISSIONS_TYPE)); } }