From e4a386df082503e2c6cc022a9c9bc654f2ffcdb5 Mon Sep 17 00:00:00 2001 From: 0age <37939117+0age@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:13:26 -0800 Subject: [PATCH] finish breaking up function casts and adding natspec --- foundry.toml | 2 +- src/interfaces/ITheCompact.sol | 15 +- src/lib/ClaimHashFunctionCastLib.sol | 1021 ++++++++ src/lib/ClaimHashLib.sol | 70 +- src/lib/ClaimProcessorFunctionCastLib.sol | 935 +++++++ src/lib/ClaimProcessorLogic.sol | 133 +- src/lib/DepositViaPermit2Logic.sol | 21 +- src/lib/DirectDepositLogic.sol | 3 +- src/lib/FunctionCastLib.sol | 2767 --------------------- src/lib/HashLib.sol | 2 +- src/lib/MetadataLib.sol | 3 +- src/lib/TransferFunctionCastLib.sol | 6 +- src/lib/TransferLogic.sol | 6 +- 13 files changed, 2052 insertions(+), 2932 deletions(-) create mode 100644 src/lib/ClaimHashFunctionCastLib.sol create mode 100644 src/lib/ClaimProcessorFunctionCastLib.sol delete mode 100644 src/lib/FunctionCastLib.sol diff --git a/foundry.toml b/foundry.toml index d9e7d95..c26e16b 100644 --- a/foundry.toml +++ b/foundry.toml @@ -15,6 +15,6 @@ extra_output_files = ["irOptimized"] # TODO: use default with everything but FunctionSpecializer (F) [fmt] -line_length = 200 +line_length = 210 tab_width = 4 bracket_spacing = true \ No newline at end of file diff --git a/src/interfaces/ITheCompact.sol b/src/interfaces/ITheCompact.sol index ea7f5ad..8028420 100644 --- a/src/interfaces/ITheCompact.sol +++ b/src/interfaces/ITheCompact.sol @@ -193,18 +193,9 @@ interface ITheCompact { * @param signature The Permit2 signature from the depositor authorizing the deposit. * @return id The ERC6909 token identifier of the associated resource lock. */ - function deposit( - address token, - uint256 amount, - uint256 nonce, - uint256 deadline, - address depositor, - address allocator, - ResetPeriod resetPeriod, - Scope scope, - address recipient, - bytes calldata signature - ) external returns (uint256 id); + function deposit(address token, uint256 amount, uint256 nonce, uint256 deadline, address depositor, address allocator, ResetPeriod resetPeriod, Scope scope, address recipient, bytes calldata signature) + external + returns (uint256 id); /** * @notice External function for depositing ERC20 tokens using Permit2 authorization and diff --git a/src/lib/ClaimHashFunctionCastLib.sol b/src/lib/ClaimHashFunctionCastLib.sol new file mode 100644 index 0000000..e318de9 --- /dev/null +++ b/src/lib/ClaimHashFunctionCastLib.sol @@ -0,0 +1,1021 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.27; + +import { BasicClaim, QualifiedClaim, ClaimWithWitness, QualifiedClaimWithWitness, SplitClaim, SplitClaimWithWitness, QualifiedSplitClaim, QualifiedSplitClaimWithWitness } from "../types/Claims.sol"; + +import { + BatchClaim, + QualifiedBatchClaim, + BatchClaimWithWitness, + QualifiedBatchClaimWithWitness, + SplitBatchClaim, + SplitBatchClaimWithWitness, + QualifiedSplitBatchClaim, + QualifiedSplitBatchClaimWithWitness +} from "../types/BatchClaims.sol"; + +import { + MultichainClaim, + QualifiedMultichainClaim, + MultichainClaimWithWitness, + QualifiedMultichainClaimWithWitness, + SplitMultichainClaim, + SplitMultichainClaimWithWitness, + QualifiedSplitMultichainClaim, + QualifiedSplitMultichainClaimWithWitness, + ExogenousMultichainClaim, + ExogenousQualifiedMultichainClaim, + ExogenousMultichainClaimWithWitness, + ExogenousQualifiedMultichainClaimWithWitness, + ExogenousSplitMultichainClaim, + ExogenousSplitMultichainClaimWithWitness, + ExogenousQualifiedSplitMultichainClaim, + ExogenousQualifiedSplitMultichainClaimWithWitness +} from "../types/MultichainClaims.sol"; + +import { + BatchMultichainClaim, + QualifiedBatchMultichainClaim, + BatchMultichainClaimWithWitness, + QualifiedBatchMultichainClaimWithWitness, + SplitBatchMultichainClaim, + SplitBatchMultichainClaimWithWitness, + QualifiedSplitBatchMultichainClaim, + QualifiedSplitBatchMultichainClaimWithWitness, + ExogenousBatchMultichainClaim, + ExogenousQualifiedBatchMultichainClaim, + ExogenousBatchMultichainClaimWithWitness, + ExogenousQualifiedBatchMultichainClaimWithWitness, + ExogenousSplitBatchMultichainClaim, + ExogenousSplitBatchMultichainClaimWithWitness, + ExogenousQualifiedSplitBatchMultichainClaim, + ExogenousQualifiedSplitBatchMultichainClaimWithWitness +} from "../types/BatchMultichainClaims.sol"; + +/** + * @title ClaimHashFunctionCastLib + * @notice Libray contract implementing function casts used throughout the codebase, + * particularly as part of processing claims. The input function operates on a + * function that takes some argument that differs from what is currently available. + * The output function modifies one or more argument types so that they match the + * arguments that are being used to call the function. Note that from the perspective + * of the function being modified, the original type is still in force; great care + * should be taken to preserve offsets and general structure between the two structs. + * @dev Note that some of these function casts may no longer be in use. + */ +library ClaimHashFunctionCastLib { + /** + * @notice Function cast to provide a BasicClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib._toBasicMessageHash`. + */ + function usingBasicClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) + internal + pure + returns (function (BasicClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitClaim calldata struct while + * treating it as a BasicClaim calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toBasicMessageHash(BasicClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toClaimHash(SplitClaim calldata)`. + */ + function usingSplitClaim(function (BasicClaim calldata) internal view returns (bytes32) fnIn) internal pure returns (function (SplitClaim calldata) internal view returns (bytes32) fnOut) { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a BatchClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib._toBasicMessageHash(BatchClaim calldata)`. + */ + function usingBatchClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) + internal + pure + returns (function (BatchClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitBatchClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toClaimHash(SplitBatchClaim calldata)`. + */ + function usingSplitBatchClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) + internal + pure + returns (function (SplitBatchClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a MultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib._toMultichainMessageHash(MultichainClaim calldata)`. + */ + function usingMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) + internal + pure + returns (function (MultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitMultichainClaim calldata struct while + * treating it as a MultichainClaim calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toMultichainMessageHash(MultichainClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toClaimHash(SplitMultichainClaim calldata)`. + */ + function usingSplitMultichainClaim(function (MultichainClaim calldata) internal view returns (bytes32) fnIn) + internal + pure + returns (function (SplitMultichainClaim calldata) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a BatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toClaimHash(BatchMultichainClaim calldata)`. + */ + function usingBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) + internal + pure + returns (function (BatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toClaimHash(SplitBatchMultichainClaim calldata)`. + */ + function usingSplitBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) + internal + pure + returns (function (SplitBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toClaimHash(ExogenousMultichainClaim calldata)`. + */ + function usingExogenousMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) + internal + pure + returns (function (ExogenousMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousSplitMultichainClaim calldata struct while + * treating it as an ExogenousMultichainClaim calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toExogenousMultichainMessageHash(ExogenousMultichainClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toClaimHash(ExogenousSplitMultichainClaim calldata)`. + */ + function usingExogenousSplitMultichainClaim(function (ExogenousMultichainClaim calldata) internal view returns (bytes32) fnIn) + internal + pure + returns (function (ExogenousSplitMultichainClaim calldata) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toClaimHash(ExogenousBatchMultichainClaim calldata)`. + */ + function usingExogenousBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) + internal + pure + returns (function (ExogenousBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousSplitBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toClaimHash(ExogenousSplitBatchMultichainClaim calldata)`. + */ + function usingExogenousSplitBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) + internal + pure + returns (function (ExogenousSplitBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHashWithQualificationHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedClaim calldata)`. + */ + function usingQualifiedClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitClaim calldata struct while + * treating it as a QualifiedClaim calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toQualifiedMessageHash(QualifiedClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedSplitClaim calldata)`. + */ + function usingQualifiedSplitClaim(function (QualifiedClaim calldata) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedSplitClaim calldata) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedBatchClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHashWithQualificationHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedBatchClaim calldata)`. + */ + function usingQualifiedBatchClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedBatchClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitBatchClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHashWithQualificationHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedSplitBatchClaim calldata)`. + */ + function usingQualifiedSplitBatchClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedSplitBatchClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHashWithQualificationHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedMultichainClaim calldata)`. + */ + function usingQualifiedMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitMultichainClaim calldata struct while + * treating it as a QualifiedMultichainClaim calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toQualifiedMultichainMessageHash(QualifiedMultichainClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedSplitMultichainClaim calldata)`. + */ + function usingQualifiedSplitMultichainClaim(function (QualifiedMultichainClaim calldata) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedSplitMultichainClaim calldata) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHashWithQualificationHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedBatchMultichainClaim calldata)`. + */ + function usingQualifiedBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHashWithQualificationHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedSplitBatchMultichainClaim calldata)`. + */ + function usingQualifiedSplitBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedSplitBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedMultichainClaim calldata struct + * while treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHashWithQualificationHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousQualifiedMultichainClaim calldata)`. + */ + function usingExogenousQualifiedMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (ExogenousQualifiedMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedSplitMultichainClaim calldata + * struct while treating it as an ExogenousQualifiedMultichainClaim calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toExogenousQualifiedMultichainMessageHash(ExogenousQualifiedMultichainClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousQualifiedSplitMultichainClaim calldata)`. + */ + function usingExogenousQualifiedSplitMultichainClaim(function (ExogenousQualifiedMultichainClaim calldata) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (ExogenousQualifiedSplitMultichainClaim calldata) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHashWithQualificationHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousQualifiedBatchMultichainClaim calldata)`. + */ + function usingExogenousQualifiedBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (ExogenousQualifiedBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedSplitBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMessageHashWithQualificationHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousQualifiedSplitBatchMultichainClaim calldata)`. + */ + function usingExogenousQualifiedSplitBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (ExogenousQualifiedSplitBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a MultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(MultichainClaimWithWitness calldata)`. + */ + function usingMultichainClaimWithWitness(function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (MultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitMultichainClaimWithWitness calldata struct while + * treating it as a MultichainClaimWithWitness calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toMultichainClaimWithWitnessMessageHash(MultichainClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(MultichainClaimWithWitness calldata)`. + */ + function usingSplitMultichainClaimWithWitness(function (MultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (SplitMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a BatchMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(BatchMultichainClaimWithWitness calldata)`. + */ + function usingBatchMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (BatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitBatchMultichainClaimWithWitness calldata struct + * while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(SplitBatchMultichainClaimWithWitness calldata)`. + */ + function usingSplitBatchMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (SplitBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousMultichainClaimWithWitness calldata struct + * while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousMultichainClaimWithWitness calldata)`. + */ + function usingExogenousMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (ExogenousMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousSplitMultichainClaimWithWitness calldata + * struct while treating it as an ExogenousMultichainClaimWithWitness calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toExogenousMultichainClaimWithWitnessMessageHash(ExogenousMultichainClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousSplitMultichainClaimWithWitness calldata)`. + */ + function usingExogenousSplitMultichainClaimWithWitness(function (ExogenousMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (ExogenousSplitMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousBatchMultichainClaimWithWitness calldata + * struct while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousBatchMultichainClaimWithWitness calldata)`. + */ + function usingExogenousBatchMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (ExogenousBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousSplitBatchMultichainClaimWithWitness calldata + * struct while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousSplitBatchMultichainClaimWithWitness calldata)`. + */ + function usingExogenousSplitBatchMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (ExogenousSplitBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericQualifiedClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedClaimWithWitness calldata)`. + */ + function usingQualifiedClaimWithWitness(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedClaimWithWitness calldata, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitClaimWithWitness calldata struct while + * treating it as a QualifiedClaimWithWitness calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toQualifiedClaimWithWitnessMessageHash(QualifiedClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedSplitClaimWithWitness calldata)`. + */ + function usingQualifiedSplitClaimWithWitness(function (QualifiedClaimWithWitness calldata) internal view returns (bytes32) fnIn) + internal + pure + returns (function (QualifiedSplitClaimWithWitness calldata) internal view returns (bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedBatchClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericQualifiedClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedBatchClaimWithWitness calldata)`. + */ + function usingQualifiedBatchClaimWithWitness(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedBatchClaimWithWitness calldata, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitBatchClaimWithWitness calldata struct + * while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericQualifiedClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedSplitBatchClaimWithWitness calldata)`. + */ + function usingQualifiedSplitBatchClaimWithWitness(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedSplitBatchClaimWithWitness calldata, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedMultichainClaimWithWitness calldata struct + * while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedMultichainClaimWithWitness calldata)`. + */ + function usingQualifiedMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (QualifiedMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitMultichainClaimWithWitness calldata struct + * while treating it as a QualifiedMultichainClaimWithWitness calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toQualifiedMultichainClaimWithWitnessMessageHash(QualifiedMultichainClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedSplitMultichainClaimWithWitness calldata)`. + */ + function usingQualifiedSplitMultichainClaimWithWitness(function (QualifiedMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedSplitMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedBatchMultichainClaimWithWitness calldata struct + * while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedBatchMultichainClaimWithWitness calldata)`. + */ + function usingQualifiedBatchMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (QualifiedBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitBatchMultichainClaimWithWitness calldata struct + * while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedSplitBatchMultichainClaimWithWitness calldata)`. + */ + function usingQualifiedSplitBatchMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (QualifiedSplitBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedMultichainClaimWithWitness calldata struct + * while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousQualifiedMultichainClaimWithWitness calldata)`. + */ + function usingExogenousQualifiedMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (ExogenousQualifiedMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedSplitMultichainClaimWithWitness calldata struct + * while treating it as an ExogenousQualifiedMultichainClaimWithWitness calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toExogenousQualifiedMultichainClaimWithWitnessMessageHash(ExogenousQualifiedMultichainClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousQualifiedSplitMultichainClaimWithWitness calldata)`. + */ + function usingExogenousQualifiedSplitMultichainClaimWithWitness(function (ExogenousQualifiedMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnIn) + internal + pure + returns (function (ExogenousQualifiedSplitMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedBatchMultichainClaimWithWitness calldata struct + * while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousQualifiedBatchMultichainClaimWithWitness calldata)`. + */ + function usingExogenousQualifiedBatchMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (ExogenousQualifiedBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata struct + * while treating it as a uint256 representing a calldata pointer location with witness data. + * @param fnIn Function pointer to `ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata)`. + */ + function usingExogenousQualifiedSplitBatchMultichainClaimWithWitness( + function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn + ) + internal + pure + returns ( + function (ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitClaimWithWitness calldata struct while + * treating it as a QualifiedClaimWithWitness calldata struct. + * @param fnIn Function pointer to `ClaimHashLib._toQualifiedClaimWithWitnessMessageHash(QualifiedClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(QualifiedSplitClaimWithWitness calldata)`. + */ + function usingQualifiedSplitClaimWithWitness(function (QualifiedClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnIn) + internal + pure + returns (function (QualifiedSplitClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `HashLib.toMessageHashWithWitness(uint256, uint256)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(ClaimWithWitness calldata)`. + */ + function usingClaimWithWitness(function (uint256, uint256) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (ClaimWithWitness calldata, uint256) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `HashLib.toMessageHashWithWitness(uint256, uint256)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(SplitClaimWithWitness calldata)`. + */ + function usingSplitClaimWithWitness(function (uint256, uint256) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (SplitClaimWithWitness calldata, uint256) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a BatchClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `HashLib.toMessageHashWithWitness(uint256, uint256)`. + * @return fnOut Modified function used in `ClaimHashLib.toMessageHashes(BatchClaimWithWitness calldata)`. + */ + function usingBatchClaimWithWitness(function (uint256, uint256) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (BatchClaimWithWitness calldata, uint256) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitBatchClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `HashLib.toMessageHashWithWitness(uint256, uint256)`. + * @return fnOut Modified function used in `SplitBatchClaimWithWitness.toMessageHashes(BatchClaimWithWitness calldata)`. + */ + function usingSplitBatchClaimWithWitness(function (uint256, uint256) internal view returns (bytes32, bytes32) fnIn) + internal + pure + returns (function (SplitBatchClaimWithWitness calldata, uint256) internal view returns (bytes32, bytes32) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toExogenousQualifiedMultichainMessageHash(ExogenousQualifiedMultichainClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib._toExogenousQualifiedMultichainMessageHash(ExogenousQualifiedMultichainClaim calldata)`. + */ + function usingExogenousQualifiedMultichainClaim(function(uint256, uint256) internal pure returns (uint256) fnIn) + internal + pure + returns (function(ExogenousQualifiedMultichainClaim calldata, uint256) internal pure returns (uint256) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toQualifiedMultichainMessageHash(QualifiedMultichainClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib._toQualifiedMultichainMessageHash(QualifiedMultichainClaim calldata)`. + */ + function usingQualifiedMultichainClaim(function (uint256, uint256) internal pure returns (uint256) fnIn) + internal + pure + returns (function (QualifiedMultichainClaim calldata, uint256) internal pure returns (uint256) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toQualifiedMultichainClaimWithWitnessMessageHash(QualifiedMultichainClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib._toQualifiedMultichainClaimWithWitnessMessageHash(QualifiedMultichainClaimWithWitness calldata)`. + */ + function usingQualifiedMultichainClaimWithWitness(function (uint256, uint256) internal pure returns (uint256) fnIn) + internal + pure + returns (function (QualifiedMultichainClaimWithWitness calldata, uint256) internal pure returns (uint256) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousQualifiedMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toExogenousQualifiedMultichainClaimWithWitnessMessageHash(ExogenousQualifiedMultichainClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib._toExogenousQualifiedMultichainClaimWithWitnessMessageHash(ExogenousQualifiedMultichainClaimWithWitness calldata)`. + */ + function usingExogenousQualifiedMultichainClaimWithWitness(function (uint256, uint256) internal pure returns (uint256) fnIn) + internal + pure + returns (function (ExogenousQualifiedMultichainClaimWithWitness calldata, uint256) internal pure returns (uint256) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a MultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toMultichainMessageHash(MultichainClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib._toMultichainMessageHash(MultichainClaim calldata)`. + */ + function usingMultichainClaim(function (uint256, uint256) internal pure returns (uint256) fnIn) internal pure returns (function (MultichainClaim calldata, uint256) internal pure returns (uint256) fnOut) { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a MultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toMultichainClaimWithWitnessMessageHash(MultichainClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib._toMultichainClaimWithWitnessMessageHash(MultichainClaimWithWitness calldata)`. + */ + function usingMultichainClaimWithWitness(function (uint256, uint256) internal pure returns (uint256) fnIn) + internal + pure + returns (function (MultichainClaimWithWitness calldata, uint256) internal pure returns (uint256) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toExogenousMultichainClaimWithWitnessMessageHash(ExogenousMultichainClaimWithWitness calldata)`. + * @return fnOut Modified function used in `ClaimHashLib._toExogenousMultichainClaimWithWitnessMessageHash(ExogenousMultichainClaimWithWitness calldata)`. + */ + function usingExogenousMultichainClaimWithWitness(function (uint256, uint256) internal pure returns (uint256) fnIn) + internal + pure + returns (function (ExogenousMultichainClaimWithWitness calldata, uint256) internal pure returns (uint256) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide an ExogenousMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimHashLib._toExogenousMultichainMessageHash(ExogenousMultichainClaim calldata)`. + * @return fnOut Modified function used in `ClaimHashLib._toExogenousMultichainMessageHash(ExogenousMultichainClaim calldata)`. + */ + function usingExogenousMultichainClaim(function (uint256, uint256) internal pure returns (uint256) fnIn) + internal + pure + returns (function (ExogenousMultichainClaim calldata, uint256) internal pure returns (uint256) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } +} diff --git a/src/lib/ClaimHashLib.sol b/src/lib/ClaimHashLib.sol index 27af860..e5a36ab 100644 --- a/src/lib/ClaimHashLib.sol +++ b/src/lib/ClaimHashLib.sol @@ -71,7 +71,7 @@ import { ResetPeriod } from "../types/ResetPeriod.sol"; import { Scope } from "../types/Scope.sol"; import { EfficiencyLib } from "./EfficiencyLib.sol"; -import { FunctionCastLib } from "./FunctionCastLib.sol"; +import { ClaimHashFunctionCastLib } from "./ClaimHashFunctionCastLib.sol"; import { HashLib } from "./HashLib.sol"; /** @@ -80,25 +80,25 @@ import { HashLib } from "./HashLib.sol"; * claims, allocated transfers, and withdrawals. */ library ClaimHashLib { + using ClaimHashFunctionCastLib for function(uint256, uint256) internal pure returns (uint256); + using ClaimHashFunctionCastLib for function(uint256, uint256) internal view returns (bytes32, bytes32); + using ClaimHashFunctionCastLib for function(uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32); + using ClaimHashFunctionCastLib for function(uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32); + using ClaimHashFunctionCastLib for function(uint256, uint256, function(uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32); + using ClaimHashFunctionCastLib for function(uint256, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32); + using ClaimHashFunctionCastLib for function(uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32); + using ClaimHashFunctionCastLib for function(BasicClaim calldata) internal view returns (bytes32); + using ClaimHashFunctionCastLib for function(MultichainClaim calldata) internal view returns (bytes32); + using ClaimHashFunctionCastLib for function(ExogenousMultichainClaim calldata) internal view returns (bytes32); + using ClaimHashFunctionCastLib for function(QualifiedClaim calldata) internal view returns (bytes32, bytes32); + using ClaimHashFunctionCastLib for function(QualifiedMultichainClaim calldata) internal view returns (bytes32, bytes32); + using ClaimHashFunctionCastLib for function(ExogenousQualifiedMultichainClaim calldata) internal view returns (bytes32, bytes32); + using ClaimHashFunctionCastLib for function(MultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32); + using ClaimHashFunctionCastLib for function(ExogenousMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32); + using ClaimHashFunctionCastLib for function(QualifiedClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32); + using ClaimHashFunctionCastLib for function(QualifiedMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32); + using ClaimHashFunctionCastLib for function(ExogenousQualifiedMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32); using EfficiencyLib for uint256; - using FunctionCastLib for function (uint256, uint256) internal pure returns (uint256); - using FunctionCastLib for function (uint256, uint256) internal view returns (bytes32, bytes32); - using FunctionCastLib for function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32); - using FunctionCastLib for function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32); - using FunctionCastLib for function (uint256, uint256, function(uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32); - using FunctionCastLib for function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32); - using FunctionCastLib for function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32); - using FunctionCastLib for function (BasicClaim calldata) internal view returns (bytes32); - using FunctionCastLib for function (MultichainClaim calldata) internal view returns (bytes32); - using FunctionCastLib for function (ExogenousMultichainClaim calldata) internal view returns (bytes32); - using FunctionCastLib for function (QualifiedClaim calldata) internal view returns (bytes32, bytes32); - using FunctionCastLib for function (QualifiedMultichainClaim calldata) internal view returns (bytes32, bytes32); - using FunctionCastLib for function (ExogenousQualifiedMultichainClaim calldata) internal view returns (bytes32, bytes32); - using FunctionCastLib for function (MultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32); - using FunctionCastLib for function (ExogenousMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32); - using FunctionCastLib for function (QualifiedClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32); - using FunctionCastLib for function (QualifiedMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32); - using FunctionCastLib for function (ExogenousQualifiedMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32); using HashLib for uint256; using HashLib for BatchClaimComponent[]; using HashLib for SplitBatchClaimComponent[]; @@ -215,14 +215,12 @@ library ClaimHashLib { } function toMessageHashes(ExogenousQualifiedBatchMultichainClaim calldata claim) internal view returns (bytes32 claimHash, bytes32 qualificationHash) { - return - _toGenericMessageHashWithQualificationHash.usingExogenousQualifiedBatchMultichainClaim()(claim, claim.claims.toIdsAndAmountsHash(), HashLib.toExogenousQualifiedMultichainClaimMessageHash); + return _toGenericMessageHashWithQualificationHash.usingExogenousQualifiedBatchMultichainClaim()(claim, claim.claims.toIdsAndAmountsHash(), HashLib.toExogenousQualifiedMultichainClaimMessageHash); } function toMessageHashes(ExogenousQualifiedSplitBatchMultichainClaim calldata claim) internal view returns (bytes32 claimHash, bytes32 qualificationHash) { - return _toGenericMessageHashWithQualificationHash.usingExogenousQualifiedSplitBatchMultichainClaim()( - claim, claim.claims.toSplitIdsAndAmountsHash(), HashLib.toExogenousQualifiedMultichainClaimMessageHash - ); + return + _toGenericMessageHashWithQualificationHash.usingExogenousQualifiedSplitBatchMultichainClaim()(claim, claim.claims.toSplitIdsAndAmountsHash(), HashLib.toExogenousQualifiedMultichainClaimMessageHash); } ///// CATEGORY 4: Claim with witness message & type hashes ///// @@ -271,9 +269,7 @@ library ClaimHashLib { } function toMessageHashes(ExogenousSplitBatchMultichainClaimWithWitness calldata claim) internal view returns (bytes32 claimHash, bytes32 typehash) { - return _toGenericMultichainClaimWithWitnessMessageHash.usingExogenousSplitBatchMultichainClaimWithWitness()( - claim, claim.claims.toSplitIdsAndAmountsHash(), HashLib.toExogenousMultichainClaimMessageHash - ); + return _toGenericMultichainClaimWithWitnessMessageHash.usingExogenousSplitBatchMultichainClaimWithWitness()(claim, claim.claims.toSplitIdsAndAmountsHash(), HashLib.toExogenousMultichainClaimMessageHash); } ///// CATEGORY 5: Qualified claim with witness message, qualification, & type hashes ///// @@ -306,9 +302,7 @@ library ClaimHashLib { } function toMessageHashes(QualifiedSplitBatchMultichainClaimWithWitness calldata claim) internal view returns (bytes32 claimHash, bytes32 qualificationHash, bytes32 typehash) { - return _toGenericQualifiedMultichainClaimWithWitnessMessageHash.usingQualifiedSplitBatchMultichainClaimWithWitness()( - claim, claim.claims.toSplitIdsAndAmountsHash(), HashLib.toMultichainClaimMessageHash - ); + return _toGenericQualifiedMultichainClaimWithWitnessMessageHash.usingQualifiedSplitBatchMultichainClaimWithWitness()(claim, claim.claims.toSplitIdsAndAmountsHash(), HashLib.toMultichainClaimMessageHash); } function toMessageHashes(ExogenousQualifiedMultichainClaimWithWitness calldata claim) internal view returns (bytes32 claimHash, bytes32 qualificationHash, bytes32 typehash) { @@ -418,20 +412,16 @@ library ClaimHashLib { return _toGenericQualifiedClaimWithWitnessMessageHash.usingQualifiedClaimWithWitness()(claim, uint256(0x40).asStubborn(), HashLib.toMessageHashWithWitness); } - function _toGenericQualifiedMultichainClaimWithWitnessMessageHash( - uint256 claim, - uint256 additionalInput, - function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32) hashFn - ) private view returns (bytes32, /* claimHash */ bytes32 qualificationHash, bytes32 /* typehash */ ) { + function _toGenericQualifiedMultichainClaimWithWitnessMessageHash(uint256 claim, uint256 additionalInput, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32) hashFn) + private + view + returns (bytes32, /* claimHash */ bytes32 qualificationHash, bytes32 /* typehash */ ) + { (bytes32 messageHash, bytes32 typehash) = _toGenericMultichainClaimWithWitnessMessageHashPriorToQualification(claim, additionalInput, hashFn); return (messageHash, claim.toQualificationMessageHash(messageHash, uint256(0x40).asStubborn()), typehash); } - function _toQualifiedMultichainClaimWithWitnessMessageHash(QualifiedMultichainClaimWithWitness calldata claim) - private - view - returns (bytes32 claimHash, bytes32 qualificationHash, bytes32 typehash) - { + function _toQualifiedMultichainClaimWithWitnessMessageHash(QualifiedMultichainClaimWithWitness calldata claim) private view returns (bytes32 claimHash, bytes32 qualificationHash, bytes32 typehash) { return _toGenericQualifiedMultichainClaimWithWitnessMessageHash.usingQualifiedMultichainClaimWithWitness()( claim, HashLib.toSingleIdAndAmountHash.usingQualifiedMultichainClaimWithWitness()(claim, uint256(0x80).asStubborn()), HashLib.toMultichainClaimMessageHash ); diff --git a/src/lib/ClaimProcessorFunctionCastLib.sol b/src/lib/ClaimProcessorFunctionCastLib.sol new file mode 100644 index 0000000..55d5b4d --- /dev/null +++ b/src/lib/ClaimProcessorFunctionCastLib.sol @@ -0,0 +1,935 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.27; + +import { BasicClaim, QualifiedClaim, ClaimWithWitness, QualifiedClaimWithWitness, SplitClaim, SplitClaimWithWitness, QualifiedSplitClaim, QualifiedSplitClaimWithWitness } from "../types/Claims.sol"; + +import { + BatchClaim, + QualifiedBatchClaim, + BatchClaimWithWitness, + QualifiedBatchClaimWithWitness, + SplitBatchClaim, + SplitBatchClaimWithWitness, + QualifiedSplitBatchClaim, + QualifiedSplitBatchClaimWithWitness +} from "../types/BatchClaims.sol"; + +import { + MultichainClaim, + QualifiedMultichainClaim, + MultichainClaimWithWitness, + QualifiedMultichainClaimWithWitness, + SplitMultichainClaim, + SplitMultichainClaimWithWitness, + QualifiedSplitMultichainClaim, + QualifiedSplitMultichainClaimWithWitness, + ExogenousMultichainClaim, + ExogenousQualifiedMultichainClaim, + ExogenousMultichainClaimWithWitness, + ExogenousQualifiedMultichainClaimWithWitness, + ExogenousSplitMultichainClaim, + ExogenousSplitMultichainClaimWithWitness, + ExogenousQualifiedSplitMultichainClaim, + ExogenousQualifiedSplitMultichainClaimWithWitness +} from "../types/MultichainClaims.sol"; + +import { + BatchMultichainClaim, + QualifiedBatchMultichainClaim, + BatchMultichainClaimWithWitness, + QualifiedBatchMultichainClaimWithWitness, + SplitBatchMultichainClaim, + SplitBatchMultichainClaimWithWitness, + QualifiedSplitBatchMultichainClaim, + QualifiedSplitBatchMultichainClaimWithWitness, + ExogenousBatchMultichainClaim, + ExogenousQualifiedBatchMultichainClaim, + ExogenousBatchMultichainClaimWithWitness, + ExogenousQualifiedBatchMultichainClaimWithWitness, + ExogenousSplitBatchMultichainClaim, + ExogenousSplitBatchMultichainClaimWithWitness, + ExogenousQualifiedSplitBatchMultichainClaim, + ExogenousQualifiedSplitBatchMultichainClaimWithWitness +} from "../types/BatchMultichainClaims.sol"; + +/** + * @title ClaimProcessorFunctionCastLib + * @notice Libray contract implementing function casts used in ClaimProcessorLogic. + * The input function operates on a function that takes some argument that differs + * from what is currently available. The output function modifies one or more + * argument types so that they match the arguments that are being used to call the + * function. Note that from the perspective of the function being modified, the + * original type is still in force; great care should be taken to preserve offsets + * and general structure between the two structs. + * @dev Note that some of these function casts may no longer be in use. + */ +library ClaimProcessorFunctionCastLib { + /** + * @notice Function cast to provide a BasicClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processBasicClaim`. + */ + function usingBasicClaim(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, BasicClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedClaim`. + */ + function usingQualifiedClaim(function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, bytes32, QualifiedClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processClaimWithWitness`. + */ + function usingClaimWithWitness(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, ClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedClaimWithWitness`. + */ + function usingQualifiedClaimWithWitness(function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, bytes32, QualifiedClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleSplitClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processSplitClaim`. + */ + function usingSplitClaim(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, SplitClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedSplitClaim`. + */ + function usingQualifiedSplitClaim(function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, bytes32, QualifiedSplitClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleSplitClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processSplitClaimWithWitness`. + */ + function usingSplitClaimWithWitness(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, SplitClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedSplitClaimWithWitness`. + */ + function usingQualifiedSplitClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedSplitClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a BatchClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleBatchClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processBatchClaim`. + */ + function usingBatchClaim(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, BatchClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedBatchClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processBatchClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedBatchClaim`. + */ + function usingQualifiedBatchClaim(function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, bytes32, QualifiedBatchClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a BatchClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleBatchClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processBatchClaimWithWitness`. + */ + function usingBatchClaimWithWitness(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, BatchClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedBatchClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processBatchClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedBatchClaimWithWitness`. + */ + function usingQualifiedBatchClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedBatchClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitBatchClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleSplitBatchClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processSplitBatchClaim`. + */ + function usingSplitBatchClaim(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, SplitBatchClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitBatchClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitBatchClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedSplitBatchClaim`. + */ + function usingQualifiedSplitBatchClaim(function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, bytes32, QualifiedSplitBatchClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitBatchClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleSplitBatchClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processSplitBatchClaimWithWitness`. + */ + function usingSplitBatchClaimWithWitness(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, SplitBatchClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitBatchClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitBatchClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedSplitBatchClaimWithWitness`. + */ + function usingQualifiedSplitBatchClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedSplitBatchClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a MultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processMultichainClaim`. + */ + function usingMultichainClaim(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, MultichainClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedMultichainClaim`. + */ + function usingQualifiedMultichainClaim(function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, bytes32, QualifiedMultichainClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a MultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processMultichainClaimWithWitness`. + */ + function usingMultichainClaimWithWitness(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, MultichainClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedMultichainClaimWithWitness`. + */ + function usingQualifiedMultichainClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleSplitClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processSplitMultichainClaim`. + */ + function usingSplitMultichainClaim(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, SplitMultichainClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedSplitMultichainClaim`. + */ + function usingQualifiedSplitMultichainClaim(function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedSplitMultichainClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleSplitClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processSplitMultichainClaimWithWitness`. + */ + function usingSplitMultichainClaimWithWitness(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, SplitMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedSplitMultichainClaimWithWitness`. + */ + function usingQualifiedSplitMultichainClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedSplitMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a BatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleBatchClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processBatchMultichainClaim`. + */ + function usingBatchMultichainClaim(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, BatchMultichainClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processBatchClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedBatchMultichainClaim`. + */ + function usingQualifiedBatchMultichainClaim(function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedBatchMultichainClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a BatchMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleBatchClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processBatchMultichainClaimWithWitness`. + */ + function usingBatchMultichainClaimWithWitness(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, BatchMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedBatchMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processBatchClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedBatchMultichainClaimWithWitness`. + */ + function usingQualifiedBatchMultichainClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedBatchMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleSplitBatchClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processSplitBatchMultichainClaim`. + */ + function usingSplitBatchMultichainClaim(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, SplitBatchMultichainClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitBatchClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedSplitBatchMultichainClaim`. + */ + function usingQualifiedSplitBatchMultichainClaim( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedSplitBatchMultichainClaim calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a SplitBatchMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSimpleSplitBatchClaim`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processSplitBatchMultichainClaimWithWitness`. + */ + function usingSplitBatchMultichainClaimWithWitness(function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, SplitBatchMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a QualifiedSplitBatchMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitBatchClaimWithQualification`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processQualifiedSplitBatchMultichainClaimWithWitness`. + */ + function usingQualifiedSplitBatchMultichainClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, QualifiedSplitBatchMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processClaimWithSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousMultichainClaim`. + */ + function usingExogenousMultichainClaim(function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns (function(bytes32, ExogenousMultichainClaim calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousQualifiedMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processClaimWithQualificationAndSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousQualifiedMultichainClaim`. + */ + function usingExogenousQualifiedMultichainClaim( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, ExogenousQualifiedMultichainClaim calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processClaimWithSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousMultichainClaimWithWitness`. + */ + function usingExogenousMultichainClaimWithWitness( + function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, ExogenousMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousQualifiedMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processClaimWithQualificationAndSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousQualifiedMultichainClaimWithWitness`. + */ + function usingExogenousQualifiedMultichainClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, ExogenousQualifiedMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousSplitMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitClaimWithSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousSplitMultichainClaim`. + */ + function usingExogenousSplitMultichainClaim(function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns ( + function(bytes32, ExogenousSplitMultichainClaim calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousQualifiedSplitMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitClaimWithQualificationAndSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousQualifiedSplitMultichainClaim`. + */ + function usingExogenousQualifiedSplitMultichainClaim( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, ExogenousQualifiedSplitMultichainClaim calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousSplitMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitClaimWithSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousSplitMultichainClaimWithWitness`. + */ + function usingExogenousSplitMultichainClaimWithWitness( + function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, ExogenousSplitMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousQualifiedSplitMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitClaimWithQualificationAndSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousQualifiedSplitMultichainClaimWithWitness`. + */ + function usingExogenousQualifiedSplitMultichainClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, ExogenousQualifiedSplitMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processBatchClaimWithSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousBatchMultichainClaim`. + */ + function usingExogenousBatchMultichainClaim(function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn) + internal + pure + returns ( + function(bytes32, ExogenousBatchMultichainClaim calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousQualifiedBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processBatchClaimWithQualificationAndSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousQualifiedBatchMultichainClaim`. + */ + function usingExogenousQualifiedBatchMultichainClaim( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, ExogenousQualifiedBatchMultichainClaim calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousBatchMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processBatchClaimWithSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousBatchMultichainClaimWithWitness`. + */ + function usingExogenousBatchMultichainClaimWithWitness( + function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, ExogenousBatchMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousQualifiedBatchMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processBatchClaimWithQualificationAndSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousQualifiedBatchMultichainClaimWithWitness`. + */ + function usingExogenousQualifiedBatchMultichainClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, ExogenousQualifiedBatchMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousSplitBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitBatchClaimWithSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousSplitBatchMultichainClaim`. + */ + function usingExogenousSplitBatchMultichainClaim( + function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, ExogenousSplitBatchMultichainClaim calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousQualifiedSplitBatchMultichainClaim calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitBatchClaimWithQualificationAndSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousQualifiedSplitBatchMultichainClaim`. + */ + function usingExogenousQualifiedSplitBatchMultichainClaim( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, ExogenousQualifiedSplitBatchMultichainClaim calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousSplitBatchMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitBatchClaimWithSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousSplitBatchMultichainClaimWithWitness`. + */ + function usingExogenousSplitBatchMultichainClaimWithWitness( + function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, ExogenousSplitBatchMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } + + /** + * @notice Function cast to provide a ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata struct while + * treating it as a uint256 representing a calldata pointer location. + * @param fnIn Function pointer to `ClaimProcessorLib.processSplitBatchClaimWithQualificationAndSponsorDomain`. + * @return fnOut Modified function used in `ClaimProcessorLogic._processExogenousQualifiedSplitBatchMultichainClaimWithWitness`. + */ + function usingExogenousQualifiedSplitBatchMultichainClaimWithWitness( + function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) fnIn + ) + internal + pure + returns ( + function(bytes32, bytes32, ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool) + fnOut + ) + { + assembly ("memory-safe") { + fnOut := fnIn + } + } +} diff --git a/src/lib/ClaimProcessorLogic.sol b/src/lib/ClaimProcessorLogic.sol index 76a2c07..4ffa533 100644 --- a/src/lib/ClaimProcessorLogic.sol +++ b/src/lib/ClaimProcessorLogic.sol @@ -51,10 +51,10 @@ import { import { ClaimHashLib } from "./ClaimHashLib.sol"; import { ClaimProcessorLib } from "./ClaimProcessorLib.sol"; +import { ClaimProcessorFunctionCastLib } from "./ClaimProcessorFunctionCastLib.sol"; import { DomainLib } from "./DomainLib.sol"; import { HashLib } from "./HashLib.sol"; import { EfficiencyLib } from "./EfficiencyLib.sol"; -import { FunctionCastLib } from "./FunctionCastLib.sol"; import { SharedLogic } from "./SharedLogic.sol"; import { ValidityLib } from "./ValidityLib.sol"; @@ -118,29 +118,26 @@ contract ClaimProcessorLogic is SharedLogic { using ClaimHashLib for ExogenousQualifiedSplitBatchMultichainClaim; using ClaimHashLib for ExogenousQualifiedSplitBatchMultichainClaimWithWitness; using ClaimProcessorLib for uint256; + using ClaimProcessorFunctionCastLib for function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool); + using ClaimProcessorFunctionCastLib for function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool); + using ClaimProcessorFunctionCastLib for function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool); + using ClaimProcessorFunctionCastLib for function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool); using DomainLib for uint256; using HashLib for uint256; using EfficiencyLib for uint256; - using FunctionCastLib for function(bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool); - using FunctionCastLib for function(bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool); - using FunctionCastLib for function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool); - using FunctionCastLib for function(bytes32, bytes32, uint256, uint256, bytes32, bytes32, bytes32, function(address, address, uint256, uint256) internal returns (bool)) internal returns (bool); using ValidityLib for uint96; using ValidityLib for uint256; using ValidityLib for bytes32; ///// 1. Claims ///// function _processBasicClaim(BasicClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { - return ClaimProcessorLib.processSimpleClaim.usingBasicClaim()( - claimPayload.toClaimHash(), claimPayload, uint256(0xa0).asStubborn(), uint256(0).asStubborn().typehashes(), _domainSeparator(), operation - ); + return ClaimProcessorLib.processSimpleClaim.usingBasicClaim()(claimPayload.toClaimHash(), claimPayload, uint256(0xa0).asStubborn(), uint256(0).asStubborn().typehashes(), _domainSeparator(), operation); } function _processQualifiedClaim(QualifiedClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { (bytes32 messageHash, bytes32 qualificationMessageHash) = claimPayload.toMessageHashes(); - return ClaimProcessorLib.processClaimWithQualification.usingQualifiedClaim()( - messageHash, qualificationMessageHash, claimPayload, 0xe0, uint256(0).asStubborn().typehashes(), _domainSeparator(), operation - ); + return + ClaimProcessorLib.processClaimWithQualification.usingQualifiedClaim()(messageHash, qualificationMessageHash, claimPayload, 0xe0, uint256(0).asStubborn().typehashes(), _domainSeparator(), operation); } function _processClaimWithWitness(ClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { @@ -148,10 +145,7 @@ contract ClaimProcessorLogic is SharedLogic { return ClaimProcessorLib.processSimpleClaim.usingClaimWithWitness()(messageHash, claimPayload, 0xe0, typehash, _domainSeparator(), operation); } - function _processQualifiedClaimWithWitness(QualifiedClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) - internal - returns (bool) - { + function _processQualifiedClaimWithWitness(QualifiedClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { (bytes32 messageHash, bytes32 qualificationMessageHash, bytes32 typehash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processClaimWithQualification.usingQualifiedClaimWithWitness()(messageHash, qualificationMessageHash, claimPayload, 0x120, typehash, _domainSeparator(), operation); } @@ -177,9 +171,7 @@ contract ClaimProcessorLogic is SharedLogic { returns (bool) { (bytes32 messageHash, bytes32 qualificationMessageHash, bytes32 typehash) = claimPayload.toMessageHashes(); - return ClaimProcessorLib.processSplitClaimWithQualification.usingQualifiedSplitClaimWithWitness()( - messageHash, qualificationMessageHash, claimPayload, 0x120, typehash, _domainSeparator(), operation - ); + return ClaimProcessorLib.processSplitClaimWithQualification.usingQualifiedSplitClaimWithWitness()(messageHash, qualificationMessageHash, claimPayload, 0x120, typehash, _domainSeparator(), operation); } ///// 2. Batch Claims ///// @@ -204,14 +196,11 @@ contract ClaimProcessorLogic is SharedLogic { returns (bool) { (bytes32 messageHash, bytes32 qualificationMessageHash, bytes32 typehash) = claimPayload.toMessageHashes(); - return ClaimProcessorLib.processBatchClaimWithQualification.usingQualifiedBatchClaimWithWitness()( - messageHash, qualificationMessageHash, claimPayload, 0x120, typehash, _domainSeparator(), operation - ); + return ClaimProcessorLib.processBatchClaimWithQualification.usingQualifiedBatchClaimWithWitness()(messageHash, qualificationMessageHash, claimPayload, 0x120, typehash, _domainSeparator(), operation); } function _processSplitBatchClaim(SplitBatchClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { - return - ClaimProcessorLib.processSimpleSplitBatchClaim.usingSplitBatchClaim()(claimPayload.toClaimHash(), claimPayload, 0xa0, uint256(1).asStubborn().typehashes(), _domainSeparator(), operation); + return ClaimProcessorLib.processSimpleSplitBatchClaim.usingSplitBatchClaim()(claimPayload.toClaimHash(), claimPayload, 0xa0, uint256(1).asStubborn().typehashes(), _domainSeparator(), operation); } function _processQualifiedSplitBatchClaim(QualifiedSplitBatchClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { @@ -221,10 +210,7 @@ contract ClaimProcessorLogic is SharedLogic { ); } - function _processSplitBatchClaimWithWitness(SplitBatchClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) - internal - returns (bool) - { + function _processSplitBatchClaimWithWitness(SplitBatchClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { (bytes32 messageHash, bytes32 typehash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processSimpleSplitBatchClaim.usingSplitBatchClaimWithWitness()(messageHash, claimPayload, 0xe0, typehash, _domainSeparator(), operation); } @@ -251,10 +237,7 @@ contract ClaimProcessorLogic is SharedLogic { ); } - function _processMultichainClaimWithWitness(MultichainClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) - internal - returns (bool) - { + function _processMultichainClaimWithWitness(MultichainClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { (bytes32 messageHash, bytes32 typehash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processSimpleClaim.usingMultichainClaimWithWitness()(messageHash, claimPayload, 0x100, typehash, _domainSeparator(), operation); } @@ -264,20 +247,14 @@ contract ClaimProcessorLogic is SharedLogic { returns (bool) { (bytes32 messageHash, bytes32 qualificationMessageHash, bytes32 typehash) = claimPayload.toMessageHashes(); - return ClaimProcessorLib.processClaimWithQualification.usingQualifiedMultichainClaimWithWitness()( - messageHash, qualificationMessageHash, claimPayload, 0x140, typehash, _domainSeparator(), operation - ); + return ClaimProcessorLib.processClaimWithQualification.usingQualifiedMultichainClaimWithWitness()(messageHash, qualificationMessageHash, claimPayload, 0x140, typehash, _domainSeparator(), operation); } function _processSplitMultichainClaim(SplitMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { - return - ClaimProcessorLib.processSimpleSplitClaim.usingSplitMultichainClaim()(claimPayload.toClaimHash(), claimPayload, 0xc0, uint256(2).asStubborn().typehashes(), _domainSeparator(), operation); + return ClaimProcessorLib.processSimpleSplitClaim.usingSplitMultichainClaim()(claimPayload.toClaimHash(), claimPayload, 0xc0, uint256(2).asStubborn().typehashes(), _domainSeparator(), operation); } - function _processQualifiedSplitMultichainClaim(QualifiedSplitMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) - internal - returns (bool) - { + function _processQualifiedSplitMultichainClaim(QualifiedSplitMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { (bytes32 messageHash, bytes32 qualificationMessageHash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processSplitClaimWithQualification.usingQualifiedSplitMultichainClaim()( messageHash, qualificationMessageHash, claimPayload, 0x100, uint256(2).asStubborn().typehashes(), _domainSeparator(), operation @@ -292,10 +269,10 @@ contract ClaimProcessorLogic is SharedLogic { return ClaimProcessorLib.processSimpleSplitClaim.usingSplitMultichainClaimWithWitness()(messageHash, claimPayload, 0x100, typehash, _domainSeparator(), operation); } - function _processQualifiedSplitMultichainClaimWithWitness( - QualifiedSplitMultichainClaimWithWitness calldata claimPayload, - function(address, address, uint256, uint256) internal returns (bool) operation - ) internal returns (bool) { + function _processQualifiedSplitMultichainClaimWithWitness(QualifiedSplitMultichainClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) + internal + returns (bool) + { (bytes32 messageHash, bytes32 qualificationMessageHash, bytes32 typehash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processSplitClaimWithQualification.usingQualifiedSplitMultichainClaimWithWitness()( messageHash, qualificationMessageHash, claimPayload, 0x140, typehash, _domainSeparator(), operation @@ -304,14 +281,10 @@ contract ClaimProcessorLogic is SharedLogic { ///// 4. Batch Multichain Claims ///// function _processBatchMultichainClaim(BatchMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { - return - ClaimProcessorLib.processSimpleBatchClaim.usingBatchMultichainClaim()(claimPayload.toClaimHash(), claimPayload, 0xc0, uint256(2).asStubborn().typehashes(), _domainSeparator(), operation); + return ClaimProcessorLib.processSimpleBatchClaim.usingBatchMultichainClaim()(claimPayload.toClaimHash(), claimPayload, 0xc0, uint256(2).asStubborn().typehashes(), _domainSeparator(), operation); } - function _processQualifiedBatchMultichainClaim(QualifiedBatchMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) - internal - returns (bool) - { + function _processQualifiedBatchMultichainClaim(QualifiedBatchMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { (bytes32 messageHash, bytes32 qualificationMessageHash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processBatchClaimWithQualification.usingQualifiedBatchMultichainClaim()( messageHash, qualificationMessageHash, claimPayload, 0x100, uint256(2).asStubborn().typehashes(), _domainSeparator(), operation @@ -326,23 +299,19 @@ contract ClaimProcessorLogic is SharedLogic { return ClaimProcessorLib.processSimpleBatchClaim.usingBatchMultichainClaimWithWitness()(messageHash, claimPayload, 0x100, typehash, _domainSeparator(), operation); } - function _processQualifiedBatchMultichainClaimWithWitness( - QualifiedBatchMultichainClaimWithWitness calldata claimPayload, - function(address, address, uint256, uint256) internal returns (bool) operation - ) internal returns (bool) { + function _processQualifiedBatchMultichainClaimWithWitness(QualifiedBatchMultichainClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) + internal + returns (bool) + { (bytes32 messageHash, bytes32 qualificationMessageHash, bytes32 typehash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processBatchClaimWithQualification.usingQualifiedBatchMultichainClaimWithWitness()( messageHash, qualificationMessageHash, claimPayload, 0x140, typehash, _domainSeparator(), operation ); } - function _processSplitBatchMultichainClaim(SplitBatchMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) - internal - returns (bool) - { - return ClaimProcessorLib.processSimpleSplitBatchClaim.usingSplitBatchMultichainClaim()( - claimPayload.toClaimHash(), claimPayload, 0xc0, uint256(2).asStubborn().typehashes(), _domainSeparator(), operation - ); + function _processSplitBatchMultichainClaim(SplitBatchMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { + return + ClaimProcessorLib.processSimpleSplitBatchClaim.usingSplitBatchMultichainClaim()(claimPayload.toClaimHash(), claimPayload, 0xc0, uint256(2).asStubborn().typehashes(), _domainSeparator(), operation); } function _processQualifiedSplitBatchMultichainClaim(QualifiedSplitBatchMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) @@ -410,29 +379,26 @@ contract ClaimProcessorLogic is SharedLogic { ); } - function _processExogenousSplitMultichainClaim(ExogenousSplitMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) - internal - returns (bool) - { + function _processExogenousSplitMultichainClaim(ExogenousSplitMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { return ClaimProcessorLib.processSplitClaimWithSponsorDomain.usingExogenousSplitMultichainClaim()( claimPayload.toClaimHash(), claimPayload, 0x100, claimPayload.notarizedChainId.toNotarizedDomainSeparator(), uint256(2).asStubborn().typehashes(), _domainSeparator(), operation ); } - function _processExogenousQualifiedSplitMultichainClaim( - ExogenousQualifiedSplitMultichainClaim calldata claimPayload, - function(address, address, uint256, uint256) internal returns (bool) operation - ) internal returns (bool) { + function _processExogenousQualifiedSplitMultichainClaim(ExogenousQualifiedSplitMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) + internal + returns (bool) + { (bytes32 messageHash, bytes32 qualificationMessageHash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processSplitClaimWithQualificationAndSponsorDomain.usingExogenousQualifiedSplitMultichainClaim()( messageHash, qualificationMessageHash, claimPayload, 0x140, claimPayload.notarizedChainId.toNotarizedDomainSeparator(), uint256(2).asStubborn().typehashes(), _domainSeparator(), operation ); } - function _processExogenousSplitMultichainClaimWithWitness( - ExogenousSplitMultichainClaimWithWitness calldata claimPayload, - function(address, address, uint256, uint256) internal returns (bool) operation - ) internal returns (bool) { + function _processExogenousSplitMultichainClaimWithWitness(ExogenousSplitMultichainClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) + internal + returns (bool) + { (bytes32 messageHash, bytes32 typehash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processSplitClaimWithSponsorDomain.usingExogenousSplitMultichainClaimWithWitness()( messageHash, claimPayload, 0x140, claimPayload.notarizedChainId.toNotarizedDomainSeparator(), typehash, _domainSeparator(), operation @@ -450,29 +416,26 @@ contract ClaimProcessorLogic is SharedLogic { } ///// 6. Exogenous Batch Multichain Claims ///// - function _processExogenousBatchMultichainClaim(ExogenousBatchMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) - internal - returns (bool) - { + function _processExogenousBatchMultichainClaim(ExogenousBatchMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { return ClaimProcessorLib.processBatchClaimWithSponsorDomain.usingExogenousBatchMultichainClaim()( claimPayload.toClaimHash(), claimPayload, 0x100, claimPayload.notarizedChainId.toNotarizedDomainSeparator(), uint256(2).asStubborn().typehashes(), _domainSeparator(), operation ); } - function _processExogenousQualifiedBatchMultichainClaim( - ExogenousQualifiedBatchMultichainClaim calldata claimPayload, - function(address, address, uint256, uint256) internal returns (bool) operation - ) internal returns (bool) { + function _processExogenousQualifiedBatchMultichainClaim(ExogenousQualifiedBatchMultichainClaim calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) + internal + returns (bool) + { (bytes32 messageHash, bytes32 qualificationMessageHash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processBatchClaimWithQualificationAndSponsorDomain.usingExogenousQualifiedBatchMultichainClaim()( messageHash, qualificationMessageHash, claimPayload, 0x140, claimPayload.notarizedChainId.toNotarizedDomainSeparator(), uint256(2).asStubborn().typehashes(), _domainSeparator(), operation ); } - function _processExogenousBatchMultichainClaimWithWitness( - ExogenousBatchMultichainClaimWithWitness calldata claimPayload, - function(address, address, uint256, uint256) internal returns (bool) operation - ) internal returns (bool) { + function _processExogenousBatchMultichainClaimWithWitness(ExogenousBatchMultichainClaimWithWitness calldata claimPayload, function(address, address, uint256, uint256) internal returns (bool) operation) + internal + returns (bool) + { (bytes32 messageHash, bytes32 typehash) = claimPayload.toMessageHashes(); return ClaimProcessorLib.processBatchClaimWithSponsorDomain.usingExogenousBatchMultichainClaimWithWitness()( messageHash, claimPayload, 0x140, claimPayload.notarizedChainId.toNotarizedDomainSeparator(), typehash, _domainSeparator(), operation diff --git a/src/lib/DepositViaPermit2Logic.sol b/src/lib/DepositViaPermit2Logic.sol index 9949aea..8b3823b 100644 --- a/src/lib/DepositViaPermit2Logic.sol +++ b/src/lib/DepositViaPermit2Logic.sol @@ -130,8 +130,7 @@ contract DepositViaPermit2Logic is DepositLogic { } function _depositBatchViaPermit2(ISignatureTransfer.TokenPermissions[] calldata permitted, address recipient, bytes calldata signature) internal returns (uint256[] memory) { - (uint256 totalTokensLessInitialNative, bool firstUnderlyingTokenIsNative, uint256[] memory ids, uint256[] memory initialTokenBalances) = - _preprocessAndPerformInitialNativeDeposit(permitted, recipient); + (uint256 totalTokensLessInitialNative, bool firstUnderlyingTokenIsNative, uint256[] memory ids, uint256[] memory initialTokenBalances) = _preprocessAndPerformInitialNativeDeposit(permitted, recipient); bytes32 witness = _deriveCompactDepositWitnessHash(uint256(0x84).asStubborn()); @@ -163,8 +162,7 @@ contract DepositViaPermit2Logic is DepositLogic { string calldata witness, bytes calldata signature ) internal returns (uint256[] memory) { - (uint256 totalTokensLessInitialNative, bool firstUnderlyingTokenIsNative, uint256[] memory ids, uint256[] memory initialTokenBalances) = - _preprocessAndPerformInitialNativeDeposit(permitted, depositor); + (uint256 totalTokensLessInitialNative, bool firstUnderlyingTokenIsNative, uint256[] memory ids, uint256[] memory initialTokenBalances) = _preprocessAndPerformInitialNativeDeposit(permitted, depositor); uint256 idsHash; assembly ("memory-safe") { @@ -212,8 +210,7 @@ contract DepositViaPermit2Logic is DepositLogic { // * the callvalue is zero but the first token is native // * the callvalue is nonzero but the first token is non-native // * the first token is non-native and the callvalue doesn't equal the first amount - if or(iszero(totalTokens), or(eq(firstUnderlyingTokenIsNative, iszero(callvalue())), and(firstUnderlyingTokenIsNative, iszero(eq(callvalue(), calldataload(add(permittedOffset, 0x20))))))) - { + if or(iszero(totalTokens), or(eq(firstUnderlyingTokenIsNative, iszero(callvalue())), and(firstUnderlyingTokenIsNative, iszero(eq(callvalue(), calldataload(add(permittedOffset, 0x20))))))) { // revert InvalidBatchDepositStructure() mstore(0, 0xca0fc08e) revert(0x1c, 0x04) @@ -332,13 +329,11 @@ contract DepositViaPermit2Logic is DepositLogic { } // NOTE: all tokens must be supplied in ascending order and cannot be duplicated. - function _prepareIdsAndGetBalances( - uint256[] memory ids, - uint256 totalTokensLessInitialNative, - bool firstUnderlyingTokenIsNative, - ISignatureTransfer.TokenPermissions[] calldata permitted, - uint256 id - ) private view returns (uint256[] memory tokenBalances) { + function _prepareIdsAndGetBalances(uint256[] memory ids, uint256 totalTokensLessInitialNative, bool firstUnderlyingTokenIsNative, ISignatureTransfer.TokenPermissions[] calldata permitted, uint256 id) + private + view + returns (uint256[] memory tokenBalances) + { unchecked { tokenBalances = new uint256[](totalTokensLessInitialNative); diff --git a/src/lib/DirectDepositLogic.sol b/src/lib/DirectDepositLogic.sol index 4df6205..d720df8 100644 --- a/src/lib/DirectDepositLogic.sol +++ b/src/lib/DirectDepositLogic.sol @@ -47,8 +47,7 @@ contract DirectDepositLogic is DepositLogic { // * the callvalue is zero but the first token is native // * the callvalue is nonzero but the first token is non-native // * the first token is non-native and the callvalue doesn't equal the first amount - if or(iszero(totalIds), or(eq(firstUnderlyingTokenIsNative, iszero(callvalue())), and(firstUnderlyingTokenIsNative, iszero(eq(callvalue(), calldataload(add(idsAndAmountsOffset, 0x20))))))) - { + if or(iszero(totalIds), or(eq(firstUnderlyingTokenIsNative, iszero(callvalue())), and(firstUnderlyingTokenIsNative, iszero(eq(callvalue(), calldataload(add(idsAndAmountsOffset, 0x20))))))) { // revert InvalidBatchDepositStructure() mstore(0, 0xca0fc08e) revert(0x1c, 0x04) diff --git a/src/lib/FunctionCastLib.sol b/src/lib/FunctionCastLib.sol deleted file mode 100644 index 80f5b9b..0000000 --- a/src/lib/FunctionCastLib.sol +++ /dev/null @@ -1,2767 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.27; - -import { - BasicTransfer, - SplitTransfer, - BasicClaim, - QualifiedClaim, - ClaimWithWitness, - QualifiedClaimWithWitness, - SplitClaim, - SplitClaimWithWitness, - QualifiedSplitClaim, - QualifiedSplitClaimWithWitness -} from "../types/Claims.sol"; - -import { - BatchTransfer, - SplitBatchTransfer, - BatchClaim, - QualifiedBatchClaim, - BatchClaimWithWitness, - QualifiedBatchClaimWithWitness, - SplitBatchClaim, - SplitBatchClaimWithWitness, - QualifiedSplitBatchClaim, - QualifiedSplitBatchClaimWithWitness -} from "../types/BatchClaims.sol"; - -import { - MultichainClaim, - QualifiedMultichainClaim, - MultichainClaimWithWitness, - QualifiedMultichainClaimWithWitness, - SplitMultichainClaim, - SplitMultichainClaimWithWitness, - QualifiedSplitMultichainClaim, - QualifiedSplitMultichainClaimWithWitness, - ExogenousMultichainClaim, - ExogenousQualifiedMultichainClaim, - ExogenousMultichainClaimWithWitness, - ExogenousQualifiedMultichainClaimWithWitness, - ExogenousSplitMultichainClaim, - ExogenousSplitMultichainClaimWithWitness, - ExogenousQualifiedSplitMultichainClaim, - ExogenousQualifiedSplitMultichainClaimWithWitness -} from "../types/MultichainClaims.sol"; - -import { - BatchMultichainClaim, - QualifiedBatchMultichainClaim, - BatchMultichainClaimWithWitness, - QualifiedBatchMultichainClaimWithWitness, - SplitBatchMultichainClaim, - SplitBatchMultichainClaimWithWitness, - QualifiedSplitBatchMultichainClaim, - QualifiedSplitBatchMultichainClaimWithWitness, - ExogenousBatchMultichainClaim, - ExogenousQualifiedBatchMultichainClaim, - ExogenousBatchMultichainClaimWithWitness, - ExogenousQualifiedBatchMultichainClaimWithWitness, - ExogenousSplitBatchMultichainClaim, - ExogenousSplitBatchMultichainClaimWithWitness, - ExogenousQualifiedSplitBatchMultichainClaim, - ExogenousQualifiedSplitBatchMultichainClaimWithWitness -} from "../types/BatchMultichainClaims.sol"; - -import { TransferComponent, SplitByIdComponent, BatchClaimComponent, SplitBatchClaimComponent } from "../types/Components.sol"; - -/** - * @title FunctionCastLib - * @notice Libray contract implementing function casts used throughout the codebase, - * particularly as part of processing claims. The input function operates on a - * function that takes some argument that differs from what is currently available. - * The output function modifies one or more argument types so that they match the - * arguments that are being used to call the function. Note that from the perspective - * of the function being modified, the original type is still in force; great care - * should be taken to preserve offsets and general structure between the two structs. - * @dev Note that some of these function casts may no longer be in use. - */ -library FunctionCastLib { - /** - * @notice Function cast to provide a BasicClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHash - * @return fnOut Modified function for ClaimHashLib._toBasicMessageHash - */ - function usingBasicClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) - internal - pure - returns (function (BasicClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitClaim calldata struct while - * treating it as a BasicClaim calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toBasicMessageHash(BasicClaim calldata) - * @return fnOut Modified function for ClaimHashLib.toClaimHash(SplitClaim calldata) - */ - function usingSplitClaim(function (BasicClaim calldata) internal view returns (bytes32) fnIn) internal pure returns (function (SplitClaim calldata) internal view returns (bytes32) fnOut) { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a BatchClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHash - * @return fnOut Modified function for ClaimHashLib._toBasicMessageHash(BatchClaim calldata) - */ - function usingBatchClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) - internal - pure - returns (function (BatchClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitBatchClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHash - * @return fnOut Modified function for ClaimHashLib.toClaimHash(SplitBatchClaim calldata) - */ - function usingSplitBatchClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) - internal - pure - returns (function (SplitBatchClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a MultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHash - * @return fnOut Modified function for ClaimHashLib._toMultichainMessageHash(MultichainClaim calldata) - */ - function usingMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) - internal - pure - returns (function (MultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitMultichainClaim calldata struct while - * treating it as a MultichainClaim calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toMultichainMessageHash(MultichainClaim calldata) - * @return fnOut Modified function for ClaimHashLib.toClaimHash(SplitMultichainClaim calldata) - */ - function usingSplitMultichainClaim(function (MultichainClaim calldata) internal view returns (bytes32) fnIn) - internal - pure - returns (function (SplitMultichainClaim calldata) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a BatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHash - * @return fnOut Modified function for ClaimHashLib.toClaimHash(BatchMultichainClaim calldata) - */ - function usingBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) - internal - pure - returns (function (BatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHash - * @return fnOut Modified function for ClaimHashLib.toClaimHash(SplitBatchMultichainClaim calldata) - */ - function usingSplitBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) - internal - pure - returns (function (SplitBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHash - * @return fnOut Modified function for ClaimHashLib.toClaimHash(ExogenousMultichainClaim calldata) - */ - function usingExogenousMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) - internal - pure - returns (function (ExogenousMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousSplitMultichainClaim calldata struct while - * treating it as an ExogenousMultichainClaim calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toExogenousMultichainMessageHash(ExogenousMultichainClaim calldata) - * @return fnOut Modified function for ClaimHashLib.toClaimHash(ExogenousSplitMultichainClaim calldata) - */ - function usingExogenousSplitMultichainClaim(function (ExogenousMultichainClaim calldata) internal view returns (bytes32) fnIn) - internal - pure - returns (function (ExogenousSplitMultichainClaim calldata) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHash - * @return fnOut Modified function for ClaimHashLib.toClaimHash(ExogenousBatchMultichainClaim calldata) - */ - function usingExogenousBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) - internal - pure - returns (function (ExogenousBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousSplitBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHash - * @return fnOut Modified function for ClaimHashLib.toClaimHash(ExogenousSplitBatchMultichainClaim calldata) - */ - function usingExogenousSplitBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnIn) - internal - pure - returns (function (ExogenousSplitBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHashWithQualificationHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedClaim calldata) - */ - function usingQualifiedClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitClaim calldata struct while - * treating it as a QualifiedClaim calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toQualifiedMessageHash(QualifiedClaim calldata) - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedSplitClaim calldata) - */ - function usingQualifiedSplitClaim(function (QualifiedClaim calldata) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedSplitClaim calldata) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedBatchClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHashWithQualificationHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedBatchClaim calldata) - */ - function usingQualifiedBatchClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedBatchClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitBatchClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHashWithQualificationHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedSplitBatchClaim calldata) - */ - function usingQualifiedSplitBatchClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedSplitBatchClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHashWithQualificationHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedMultichainClaim calldata) - */ - function usingQualifiedMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitMultichainClaim calldata struct while - * treating it as a QualifiedMultichainClaim calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toQualifiedMultichainMessageHash(QualifiedMultichainClaim calldata) - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedSplitMultichainClaim calldata) - */ - function usingQualifiedSplitMultichainClaim(function (QualifiedMultichainClaim calldata) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedSplitMultichainClaim calldata) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHashWithQualificationHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedBatchMultichainClaim calldata) - */ - function usingQualifiedBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHashWithQualificationHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedSplitBatchMultichainClaim calldata) - */ - function usingQualifiedSplitBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedSplitBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedMultichainClaim calldata struct - * while treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHashWithQualificationHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousQualifiedMultichainClaim calldata) - */ - function usingExogenousQualifiedMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (ExogenousQualifiedMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedSplitMultichainClaim calldata - * struct while treating it as an ExogenousQualifiedMultichainClaim calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toExogenousQualifiedMultichainMessageHash(ExogenousQualifiedMultichainClaim calldata) - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousQualifiedSplitMultichainClaim calldata) - */ - function usingExogenousQualifiedSplitMultichainClaim(function (ExogenousQualifiedMultichainClaim calldata) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (ExogenousQualifiedSplitMultichainClaim calldata) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHashWithQualificationHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousQualifiedBatchMultichainClaim calldata) - */ - function usingExogenousQualifiedBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (ExogenousQualifiedBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedSplitBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toGenericMessageHashWithQualificationHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousQualifiedSplitBatchMultichainClaim calldata) - */ - function usingExogenousQualifiedSplitBatchMultichainClaim(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (ExogenousQualifiedSplitBatchMultichainClaim calldata, uint256, function(uint256, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a MultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(MultichainClaimWithWitness calldata) - */ - function usingMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (MultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitMultichainClaimWithWitness calldata struct while - * treating it as a MultichainClaimWithWitness calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toMultichainClaimWithWitnessMessageHash(MultichainClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(MultichainClaimWithWitness calldata) - */ - function usingSplitMultichainClaimWithWitness(function (MultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (SplitMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a BatchMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(BatchMultichainClaimWithWitness calldata) - */ - function usingBatchMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (BatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitBatchMultichainClaimWithWitness calldata struct - * while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(SplitBatchMultichainClaimWithWitness calldata) - */ - function usingSplitBatchMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (SplitBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousMultichainClaimWithWitness calldata struct - * while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousMultichainClaimWithWitness calldata) - */ - function usingExogenousMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (ExogenousMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousSplitMultichainClaimWithWitness calldata - * struct while treating it as an ExogenousMultichainClaimWithWitness calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toExogenousMultichainClaimWithWitnessMessageHash(ExogenousMultichainClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousSplitMultichainClaimWithWitness calldata) - */ - function usingExogenousSplitMultichainClaimWithWitness(function (ExogenousMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (ExogenousSplitMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousBatchMultichainClaimWithWitness calldata - * struct while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousBatchMultichainClaimWithWitness calldata) - */ - function usingExogenousBatchMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (ExogenousBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousSplitBatchMultichainClaimWithWitness calldata - * struct while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousSplitBatchMultichainClaimWithWitness calldata) - */ - function usingExogenousSplitBatchMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (ExogenousSplitBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericQualifiedClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedClaimWithWitness calldata) - */ - function usingQualifiedClaimWithWitness(function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedClaimWithWitness calldata, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitClaimWithWitness calldata struct while - * treating it as a QualifiedClaimWithWitness calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toQualifiedClaimWithWitnessMessageHash(QualifiedClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedSplitClaimWithWitness calldata) - */ - function usingQualifiedSplitClaimWithWitness(function (QualifiedClaimWithWitness calldata) internal view returns (bytes32) fnIn) - internal - pure - returns (function (QualifiedSplitClaimWithWitness calldata) internal view returns (bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedBatchClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericQualifiedClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedBatchClaimWithWitness calldata) - */ - function usingQualifiedBatchClaimWithWitness( - function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (QualifiedBatchClaimWithWitness calldata, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitBatchClaimWithWitness calldata struct - * while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericQualifiedClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedSplitBatchClaimWithWitness calldata) - */ - function usingQualifiedSplitBatchClaimWithWitness( - function (uint256, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (QualifiedSplitBatchClaimWithWitness calldata, uint256, function(uint256, uint256) internal view returns (bytes32, bytes32)) internal view returns (bytes32, bytes32, bytes32) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedMultichainClaimWithWitness calldata struct - * while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedMultichainClaimWithWitness calldata) - */ - function usingQualifiedMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (QualifiedMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitMultichainClaimWithWitness calldata struct - * while treating it as a QualifiedMultichainClaimWithWitness calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toQualifiedMultichainClaimWithWitnessMessageHash(QualifiedMultichainClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedSplitMultichainClaimWithWitness calldata) - */ - function usingQualifiedSplitMultichainClaimWithWitness(function (QualifiedMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedSplitMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedBatchMultichainClaimWithWitness calldata struct - * while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedBatchMultichainClaimWithWitness calldata) - */ - function usingQualifiedBatchMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (QualifiedBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitBatchMultichainClaimWithWitness calldata struct - * while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedSplitBatchMultichainClaimWithWitness calldata) - */ - function usingQualifiedSplitBatchMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (QualifiedSplitBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedMultichainClaimWithWitness calldata struct - * while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousQualifiedMultichainClaimWithWitness calldata) - */ - function usingExogenousQualifiedMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (ExogenousQualifiedMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedSplitMultichainClaimWithWitness calldata struct - * while treating it as an ExogenousQualifiedMultichainClaimWithWitness calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toExogenousQualifiedMultichainClaimWithWitnessMessageHash(ExogenousQualifiedMultichainClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousQualifiedSplitMultichainClaimWithWitness calldata) - */ - function usingExogenousQualifiedSplitMultichainClaimWithWitness(function (ExogenousQualifiedMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnIn) - internal - pure - returns (function (ExogenousQualifiedSplitMultichainClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedBatchMultichainClaimWithWitness calldata struct - * while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousQualifiedBatchMultichainClaimWithWitness calldata) - */ - function usingExogenousQualifiedBatchMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (ExogenousQualifiedBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata struct - * while treating it as a uint256 representing a calldata pointer location with witness data. - * @param fnIn Function pointer to ClaimHashLib._toGenericQualifiedMultichainClaimWithWitnessMessageHash - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata) - */ - function usingExogenousQualifiedSplitBatchMultichainClaimWithWitness( - function (uint256, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) fnIn - ) - internal - pure - returns ( - function (ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata, uint256, function (uint256, uint256, bytes32, bytes32, uint256) internal view returns (bytes32)) internal view returns (bytes32, bytes32, bytes32) - fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a BasicClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processSimpleClaim - * @return fnOut Modified function for ClaimProcessorLogic._processBasicClaim - */ - function usingBasicClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - BasicClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedClaim - */ - function usingQualifiedClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processClaimWithWitness - */ - function usingClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - ClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedClaimWithWitness - */ - function usingQualifiedClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processSplitClaim - * @return fnOut Modified function for ClaimProcessorLogic._processSplitClaim - */ - function usingSplitClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - SplitClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedSplitClaim - */ - function usingQualifiedSplitClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedSplitClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processSplitClaimWithWitness - */ - function usingSplitClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - SplitClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedSplitClaimWithWitness - */ - function usingQualifiedSplitClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedSplitClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a BatchClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processBatchClaim - * @return fnOut Modified function for ClaimProcessorLogic._processBatchClaim - */ - function usingBatchClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - BatchClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedBatchClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedBatchClaim - */ - function usingQualifiedBatchClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedBatchClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a BatchClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processBatchClaimWithWitness - */ - function usingBatchClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - BatchClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedBatchClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedBatchClaimWithWitness - */ - function usingQualifiedBatchClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedBatchClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitBatchClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processSplitBatchClaim - * @return fnOut Modified function for ClaimProcessorLogic._processSplitBatchClaim - */ - function usingSplitBatchClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - SplitBatchClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitBatchClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedSplitBatchClaim - */ - function usingQualifiedSplitBatchClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedSplitBatchClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitBatchClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processSplitBatchClaimWithWitness - */ - function usingSplitBatchClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - SplitBatchClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitBatchClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedSplitBatchClaimWithWitness - */ - function usingQualifiedSplitBatchClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedSplitBatchClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a MultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processMultichainClaim - * @return fnOut Modified function for ClaimProcessorLogic._processMultichainClaim - */ - function usingMultichainClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - MultichainClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedMultichainClaim - */ - function usingQualifiedMultichainClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedMultichainClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a MultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processMultichainClaimWithWitness - */ - function usingMultichainClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - MultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedMultichainClaimWithWitness - */ - function usingQualifiedMultichainClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processSplitMultichainClaim - * @return fnOut Modified function for ClaimProcessorLogic._processSplitMultichainClaim - */ - function usingSplitMultichainClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - SplitMultichainClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedSplitMultichainClaim - */ - function usingQualifiedSplitMultichainClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedSplitMultichainClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processSplitMultichainClaimWithWitness - */ - function usingSplitMultichainClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - SplitMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedSplitMultichainClaimWithWitness - */ - function usingQualifiedSplitMultichainClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedSplitMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a BatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processBatchMultichainClaim - * @return fnOut Modified function for ClaimProcessorLogic._processBatchMultichainClaim - */ - function usingBatchMultichainClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - BatchMultichainClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedBatchMultichainClaim - */ - function usingQualifiedBatchMultichainClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedBatchMultichainClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a BatchMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processBatchMultichainClaimWithWitness - */ - function usingBatchMultichainClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - BatchMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedBatchMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedBatchMultichainClaimWithWitness - */ - function usingQualifiedBatchMultichainClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedBatchMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processSplitBatchMultichainClaim - * @return fnOut Modified function for ClaimProcessorLogic._processSplitBatchMultichainClaim - */ - function usingSplitBatchMultichainClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - SplitBatchMultichainClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedSplitBatchMultichainClaim - */ - function usingQualifiedSplitBatchMultichainClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedSplitBatchMultichainClaim calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitBatchMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processSplitBatchMultichainClaimWithWitness - */ - function usingSplitBatchMultichainClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - SplitBatchMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitBatchMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processQualifiedSplitBatchMultichainClaimWithWitness - */ - function usingQualifiedSplitBatchMultichainClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - QualifiedSplitBatchMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processExogenousMultichainClaim - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousMultichainClaim - */ - function usingExogenousMultichainClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - ExogenousMultichainClaim calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousQualifiedMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousQualifiedMultichainClaim - */ - function usingExogenousQualifiedMultichainClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - ExogenousQualifiedMultichainClaim calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousMultichainClaimWithWitness - */ - function usingExogenousMultichainClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - ExogenousMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousQualifiedMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousQualifiedMultichainClaimWithWitness - */ - function usingExogenousQualifiedMultichainClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - ExogenousQualifiedMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousSplitMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processExogenousSplitMultichainClaim - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousSplitMultichainClaim - */ - function usingExogenousSplitMultichainClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - ExogenousSplitMultichainClaim calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousQualifiedSplitMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousQualifiedSplitMultichainClaim - */ - function usingExogenousQualifiedSplitMultichainClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - ExogenousQualifiedSplitMultichainClaim calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousSplitMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousSplitMultichainClaimWithWitness - */ - function usingExogenousSplitMultichainClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - ExogenousSplitMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousQualifiedSplitMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousQualifiedSplitMultichainClaimWithWitness - */ - function usingExogenousQualifiedSplitMultichainClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - ExogenousQualifiedSplitMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processExogenousBatchMultichainClaim - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousBatchMultichainClaim - */ - function usingExogenousBatchMultichainClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - ExogenousBatchMultichainClaim calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousQualifiedBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousQualifiedBatchMultichainClaim - */ - function usingExogenousQualifiedBatchMultichainClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - ExogenousQualifiedBatchMultichainClaim calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousBatchMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousBatchMultichainClaimWithWitness - */ - function usingExogenousBatchMultichainClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - ExogenousBatchMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousQualifiedBatchMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousQualifiedBatchMultichainClaimWithWitness - */ - function usingExogenousQualifiedBatchMultichainClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - ExogenousQualifiedBatchMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousSplitBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processSplitBatchMultichainClaim - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousSplitBatchMultichainClaim - */ - function usingExogenousSplitBatchMultichainClaim( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - ExogenousSplitBatchMultichainClaim calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousQualifiedSplitBatchMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousQualifiedSplitBatchMultichainClaim - */ - function usingExogenousQualifiedSplitBatchMultichainClaim( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - ExogenousQualifiedSplitBatchMultichainClaim calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousSplitBatchMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithWitness - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousSplitBatchMultichainClaimWithWitness - */ - function usingExogenousSplitBatchMultichainClaimWithWitness( - function( - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - ExogenousSplitBatchMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimProcessorLib.processClaimWithQualification - * @return fnOut Modified function for ClaimProcessorLogic._processExogenousQualifiedSplitBatchMultichainClaimWithWitness - */ - function usingExogenousQualifiedSplitBatchMultichainClaimWithWitness( - function( - bytes32, - bytes32, - uint256, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnIn - ) - internal - pure - returns ( - function( - bytes32, - bytes32, - ExogenousQualifiedSplitBatchMultichainClaimWithWitness calldata, - uint256, - bytes32, - bytes32, - bytes32, - function(address, address, uint256, uint256) internal returns (bool) - ) internal returns (bool) fnOut - ) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedSplitClaimWithWitness calldata struct while - * treating it as a QualifiedClaimWithWitness calldata struct. - * @param fnIn Function pointer to ClaimHashLib._toQualifiedClaimWithWitnessMessageHash(QualifiedClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib.toMessageHashes(QualifiedSplitClaimWithWitness calldata) - */ - function usingQualifiedSplitClaimWithWitness(function (QualifiedClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnIn) - internal - pure - returns (function (QualifiedSplitClaimWithWitness calldata) internal view returns (bytes32, bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to HashLib.toMessageHashWithWitness(uint256, uint256) - * @return fnOut Modified function for HashLib.toMessageHashWithWitness(SplitClaimWithWitness calldata, uint256) - */ - function usingSplitClaimWithWitness(function (uint256, uint256) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (SplitClaimWithWitness calldata, uint256) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a ClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to HashLib.toMessageHashWithWitness(uint256, uint256) - * @return fnOut Modified function for HashLib.toMessageHashWithWitness(ClaimWithWitness calldata, uint256) - */ - function usingClaimWithWitness(function (uint256, uint256) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (ClaimWithWitness calldata, uint256) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a BatchClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to HashLib.toMessageHashWithWitness(uint256, uint256) - * @return fnOut Modified function for HashLib.toMessageHashWithWitness(BatchClaimWithWitness calldata, uint256) - */ - function usingBatchClaimWithWitness(function (uint256, uint256) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (BatchClaimWithWitness calldata, uint256) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a SplitBatchClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to HashLib.toMessageHashWithWitness(uint256, uint256) - * @return fnOut Modified function for HashLib.toMessageHashWithWitness(SplitBatchClaimWithWitness calldata, uint256) - */ - function usingSplitBatchClaimWithWitness(function (uint256, uint256) internal view returns (bytes32, bytes32) fnIn) - internal - pure - returns (function (SplitBatchClaimWithWitness calldata, uint256) internal view returns (bytes32, bytes32) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toExogenousQualifiedMultichainMessageHash(ExogenousQualifiedMultichainClaim calldata) - * @return fnOut Modified function for ClaimHashLib._toExogenousQualifiedMultichainMessageHash(ExogenousQualifiedMultichainClaim calldata) - */ - function usingExogenousQualifiedMultichainClaim(function(uint256, uint256) internal pure returns (uint256) fnIn) - internal - pure - returns (function(ExogenousQualifiedMultichainClaim calldata, uint256) internal pure returns (uint256) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toQualifiedMultichainMessageHash(QualifiedMultichainClaim calldata) - * @return fnOut Modified function for ClaimHashLib._toQualifiedMultichainMessageHash(QualifiedMultichainClaim calldata) - */ - function usingQualifiedMultichainClaim(function (uint256, uint256) internal pure returns (uint256) fnIn) - internal - pure - returns (function (QualifiedMultichainClaim calldata, uint256) internal pure returns (uint256) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a QualifiedMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toQualifiedMultichainClaimWithWitnessMessageHash(QualifiedMultichainClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib._toQualifiedMultichainClaimWithWitnessMessageHash(QualifiedMultichainClaimWithWitness calldata) - */ - function usingQualifiedMultichainClaimWithWitness(function (uint256, uint256) internal pure returns (uint256) fnIn) - internal - pure - returns (function (QualifiedMultichainClaimWithWitness calldata, uint256) internal pure returns (uint256) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousQualifiedMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toExogenousQualifiedMultichainClaimWithWitnessMessageHash(ExogenousQualifiedMultichainClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib._toExogenousQualifiedMultichainClaimWithWitnessMessageHash(ExogenousQualifiedMultichainClaimWithWitness calldata) - */ - function usingExogenousQualifiedMultichainClaimWithWitness(function (uint256, uint256) internal pure returns (uint256) fnIn) - internal - pure - returns (function (ExogenousQualifiedMultichainClaimWithWitness calldata, uint256) internal pure returns (uint256) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a MultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toMultichainMessageHash(MultichainClaim calldata) - * @return fnOut Modified function for ClaimHashLib._toMultichainMessageHash(MultichainClaim calldata) - */ - function usingMultichainClaim(function (uint256, uint256) internal pure returns (uint256) fnIn) - internal - pure - returns (function (MultichainClaim calldata, uint256) internal pure returns (uint256) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide a MultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toMultichainClaimWithWitnessMessageHash(MultichainClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib._toMultichainClaimWithWitnessMessageHash(MultichainClaimWithWitness calldata) - */ - function usingMultichainClaimWithWitness(function (uint256, uint256) internal pure returns (uint256) fnIn) - internal - pure - returns (function (MultichainClaimWithWitness calldata, uint256) internal pure returns (uint256) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousMultichainClaimWithWitness calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toExogenousMultichainClaimWithWitnessMessageHash(ExogenousMultichainClaimWithWitness calldata) - * @return fnOut Modified function for ClaimHashLib._toExogenousMultichainClaimWithWitnessMessageHash(ExogenousMultichainClaimWithWitness calldata) - */ - function usingExogenousMultichainClaimWithWitness(function (uint256, uint256) internal pure returns (uint256) fnIn) - internal - pure - returns (function (ExogenousMultichainClaimWithWitness calldata, uint256) internal pure returns (uint256) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } - - /** - * @notice Function cast to provide an ExogenousMultichainClaim calldata struct while - * treating it as a uint256 representing a calldata pointer location. - * @param fnIn Function pointer to ClaimHashLib._toExogenousMultichainMessageHash(ExogenousMultichainClaim calldata) - * @return fnOut Modified function for ClaimHashLib._toExogenousMultichainMessageHash(ExogenousMultichainClaim calldata) - */ - function usingExogenousMultichainClaim(function (uint256, uint256) internal pure returns (uint256) fnIn) - internal - pure - returns (function (ExogenousMultichainClaim calldata, uint256) internal pure returns (uint256) fnOut) - { - assembly ("memory-safe") { - fnOut := fnIn - } - } -} diff --git a/src/lib/HashLib.sol b/src/lib/HashLib.sol index 53eb005..fde0eb3 100644 --- a/src/lib/HashLib.sol +++ b/src/lib/HashLib.sol @@ -39,7 +39,7 @@ import { TransferFunctionCastLib } from "./TransferFunctionCastLib.sol"; library HashLib { using EfficiencyLib for bool; using EfficiencyLib for uint256; - using TransferFunctionCastLib for function (BatchTransfer calldata, uint256) internal view returns (bytes32); + using TransferFunctionCastLib for function(BatchTransfer calldata, uint256) internal view returns (bytes32); using HashLib for uint256; using HashLib for BatchTransfer; diff --git a/src/lib/MetadataLib.sol b/src/lib/MetadataLib.sol index 455c737..074e937 100644 --- a/src/lib/MetadataLib.sol +++ b/src/lib/MetadataLib.sol @@ -68,8 +68,7 @@ library MetadataLib { string memory tokenDecimals = uint256(lock.token.readDecimals()).toString(); string memory name = string.concat("{\"name\": \"Compact ", tokenSymbol, "\","); - string memory description = - string.concat("\"description\": \"Compact ", tokenName, " (", tokenAddress, ") resource lock with allocator ", allocator, " and reset period of ", resetPeriod, "\","); + string memory description = string.concat("\"description\": \"Compact ", tokenName, " (", tokenAddress, ") resource lock with allocator ", allocator, " and reset period of ", resetPeriod, "\","); string memory attributes = string.concat( "\"attributes\": [", toAttributeString("ID", id.toString(), false), diff --git a/src/lib/TransferFunctionCastLib.sol b/src/lib/TransferFunctionCastLib.sol index 089585a..4db7b1f 100644 --- a/src/lib/TransferFunctionCastLib.sol +++ b/src/lib/TransferFunctionCastLib.sol @@ -46,11 +46,7 @@ library TransferFunctionCastLib { * @param fnIn Function pointer to `TransferLogic._notExpiredAndSignedByAllocator`. * @return fnOut Modified function used in `TransferLogic._processSplitBatchTransfer`. */ - function usingSplitBatchTransfer(function (bytes32, address, BasicTransfer calldata) internal fnIn) - internal - pure - returns (function (bytes32, address, SplitBatchTransfer calldata) internal fnOut) - { + function usingSplitBatchTransfer(function (bytes32, address, BasicTransfer calldata) internal fnIn) internal pure returns (function (bytes32, address, SplitBatchTransfer calldata) internal fnOut) { assembly ("memory-safe") { fnOut := fnIn } diff --git a/src/lib/TransferLogic.sol b/src/lib/TransferLogic.sol index 6a89241..102b975 100644 --- a/src/lib/TransferLogic.sol +++ b/src/lib/TransferLogic.sol @@ -36,7 +36,7 @@ contract TransferLogic is SharedLogic { using ValidityLib for uint96; using ValidityLib for uint256; using ValidityLib for bytes32; - using TransferFunctionCastLib for function (bytes32, address, BasicTransfer calldata) internal; + using TransferFunctionCastLib for function(bytes32, address, BasicTransfer calldata) internal; using TransferFunctionCastLib for function(TransferComponent[] calldata, uint256, function (TransferComponent[] calldata, uint256) internal pure returns (uint96)) internal returns (address); // bytes4(keccak256("attest(address,address,address,uint256,uint256)")). @@ -85,9 +85,7 @@ contract TransferLogic is SharedLogic { */ function _processBatchTransfer(BatchTransfer calldata transfer, function(address, address, uint256, uint256) internal returns (bool) operation) internal returns (bool) { // Derive hash, validate expiry, consume nonce, and check allocator signature. - _notExpiredAndSignedByAllocator.usingBatchTransfer()( - transfer.toClaimHash(), _deriveConsistentAllocatorAndConsumeNonce(transfer.transfers, transfer.nonce, _allocatorIdOfTransferComponentId), transfer - ); + _notExpiredAndSignedByAllocator.usingBatchTransfer()(transfer.toClaimHash(), _deriveConsistentAllocatorAndConsumeNonce(transfer.transfers, transfer.nonce, _allocatorIdOfTransferComponentId), transfer); // Perform the batch transfers or withdrawals. return transfer.performBatchTransfer(operation);