{"constructor_args":null,"is_partially_verified":true,"is_changed_bytecode":false,"abi":[{"inputs":[],"name":"BatchOfBatchesDecodingError","type":"error"},{"inputs":[],"name":"FnSelectorNotRecognized","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"InsufficientGas","type":"error"},{"inputs":[],"name":"LengthMismatch","type":"error"},{"inputs":[],"name":"UnsupportedExecutionMode","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"batchExecutionindex","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"result","type":"bytes"}],"name":"TryExecuteUnsuccessful","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"bytes32","name":"mode","type":"bytes32"},{"internalType":"bytes","name":"executionData","type":"bytes"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"mode","type":"bytes32"}],"name":"supportsExecutionMode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}],"conflicting_implementations":null,"certified":false,"additional_sources":[{"file_path":"dependencies/solady-0.1.26/src/accounts/ERC7821.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport {Receiver} from \"./Receiver.sol\";\n\n/// @notice Minimal batch executor mixin.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/accounts/ERC7821.sol)\n///\n/// @dev This contract can be inherited to create fully-fledged smart accounts.\n/// If you merely want to combine approve-swap transactions into a single transaction\n/// using [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702), you will need to implement basic\n/// [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) `isValidSignature` functionality to\n/// validate signatures with `ecrecover` against the EOA address. This is necessary because some\n/// signature checks skip `ecrecover` if the signer has code. For a basic EOA batch executor,\n/// please refer to [BEBE](https://github.com/vectorized/bebe), which inherits from this class.\ncontract ERC7821 is Receiver {\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                          STRUCTS                           */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev Call struct for the `execute` function.\n    struct Call {\n        address to; // Replaced as `address(this)` if `address(0)`. Renamed to `to` for Ithaca Porto.\n        uint256 value; // Amount of native currency (i.e. Ether) to send.\n        bytes data; // Calldata to send with the call.\n    }\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                       CUSTOM ERRORS                        */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev The execution mode is not supported.\n    error UnsupportedExecutionMode();\n\n    /// @dev Cannot decode `executionData` as a batch of batches `abi.encode(bytes[])`.\n    error BatchOfBatchesDecodingError();\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                    EXECUTION OPERATIONS                    */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev Executes the calls in `executionData`.\n    /// Reverts and bubbles up error if any call fails.\n    ///\n    /// `executionData` encoding (single batch):\n    /// - If `opData` is empty, `executionData` is simply `abi.encode(calls)`.\n    /// - Else, `executionData` is `abi.encode(calls, opData)`.\n    ///   See: https://eips.ethereum.org/EIPS/eip-7579\n    ///\n    /// `executionData` encoding (batch of batches):\n    /// - `executionData` is `abi.encode(bytes[])`, where each element in `bytes[]`\n    ///   is an `executionData` for a single batch.\n    ///\n    /// Supported modes:\n    /// - `0x01000000000000000000...`: Single batch. Does not support optional `opData`.\n    /// - `0x01000000000078210001...`: Single batch. Supports optional `opData`.\n    /// - `0x01000000000078210002...`: Batch of batches.\n    ///\n    /// For the \"batch of batches\" mode, each batch will be recursively passed into\n    /// `execute` internally with mode `0x01000000000078210001...`.\n    /// Useful for passing in batches signed by different signers.\n    ///\n    /// Authorization checks:\n    /// - If `opData` is empty, the implementation SHOULD require that\n    ///   `msg.sender == address(this)`.\n    /// - If `opData` is not empty, the implementation SHOULD use the signature\n    ///   encoded in `opData` to determine if the caller can perform the execution.\n    /// - If `msg.sender` is an authorized entry point, then `execute` MAY accept\n    ///   calls from the entry point, and MAY use `opData` for specialized logic.\n    ///\n    /// `opData` may be used to store additional data for authentication,\n    /// paymaster data, gas limits, etc.\n    function execute(bytes32 mode, bytes calldata executionData) public payable virtual {\n        uint256 id = _executionModeId(mode);\n        if (id == 3) return _executeBatchOfBatches(mode, executionData);\n        Call[] calldata calls;\n        bytes calldata opData;\n        /// @solidity memory-safe-assembly\n        assembly {\n            if iszero(id) {\n                mstore(0x00, 0x7f181275) // `UnsupportedExecutionMode()`.\n                revert(0x1c, 0x04)\n            }\n            // Use inline assembly to extract the calls and optional `opData` efficiently.\n            opData.length := 0\n            let o := add(executionData.offset, calldataload(executionData.offset))\n            calls.offset := add(o, 0x20)\n            calls.length := calldataload(o)\n            // If the offset of `executionData` allows for `opData`, and the mode supports it.\n            if gt(eq(id, 2), gt(0x40, calldataload(executionData.offset))) {\n                let q := add(executionData.offset, calldataload(add(0x20, executionData.offset)))\n                opData.offset := add(q, 0x20)\n                opData.length := calldataload(q)\n            }\n            // Bounds checking for `executionData` is skipped here for efficiency.\n            // This is safe if it is only used as an argument to `execute` externally.\n            // If `executionData` used as an argument to other functions externally,\n            // please perform the bounds checks via `LibERC7579.decodeBatchAndOpData`\n            /// or `abi.decode` in the other functions for safety.\n        }\n        _execute(mode, executionData, calls, opData);\n    }\n\n    /// @dev Provided for execution mode support detection.\n    function supportsExecutionMode(bytes32 mode) public view virtual returns (bool result) {\n        return _executionModeId(mode) != 0;\n    }\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                      INTERNAL HELPERS                      */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev 0: invalid mode, 1: no `opData` support, 2: with `opData` support, 3: batch of batches.\n    function _executionModeId(bytes32 mode) internal view virtual returns (uint256 id) {\n        // Only supports atomic batched executions.\n        // For the encoding scheme, see: https://eips.ethereum.org/EIPS/eip-7579\n        // Bytes Layout:\n        // - [0]      ( 1 byte )  `0x01` for batch call.\n        // - [1]      ( 1 byte )  `0x00` for revert on any failure.\n        // - [2..5]   ( 4 bytes)  Reserved by ERC7579 for future standardization.\n        // - [6..9]   ( 4 bytes)  `0x00000000` or `0x78210001` or `0x78210002`.\n        // - [10..31] (22 bytes)  Unused. Free for use.\n        /// @solidity memory-safe-assembly\n        assembly {\n            let m := and(shr(mul(22, 8), mode), 0xffff00000000ffffffff)\n            id := eq(m, 0x01000000000000000000) // 1.\n            id := or(shl(1, eq(m, 0x01000000000078210001)), id) // 2.\n            id := or(mul(3, eq(m, 0x01000000000078210002)), id) // 3.\n        }\n    }\n\n    /// @dev For execution of a batch of batches.\n    function _executeBatchOfBatches(bytes32 mode, bytes calldata executionData) internal virtual {\n        // Replace with `0x0100________78210001...` while preserving optional and reserved fields.\n        mode ^= bytes32(uint256(3 << (22 * 8))); // `2 XOR 3 = 1`.\n        (uint256 n, uint256 o, uint256 e) = (0, 0, 0);\n        /// @solidity memory-safe-assembly\n        assembly {\n            let j := calldataload(executionData.offset)\n            let t := add(executionData.offset, j)\n            n := calldataload(t) // `batches.length`.\n            o := add(0x20, t) // Offset of `batches[0]`.\n            e := add(executionData.offset, executionData.length) // End of `executionData`.\n            // Do the bounds check on `executionData` treating it as `abi.encode(bytes[])`.\n            // Not too expensive, so we will just do it right here right now.\n            if or(shr(64, j), or(lt(executionData.length, 0x20), gt(add(o, shl(5, n)), e))) {\n                mstore(0x00, 0x3995943b) // `BatchOfBatchesDecodingError()`.\n                revert(0x1c, 0x04)\n            }\n        }\n        unchecked {\n            for (uint256 i; i != n; ++i) {\n                bytes calldata batch;\n                /// @solidity memory-safe-assembly\n                assembly {\n                    let j := calldataload(add(o, shl(5, i)))\n                    let t := add(o, j)\n                    batch.offset := add(t, 0x20)\n                    batch.length := calldataload(t)\n                    // Validate that `batches[i]` is not out-of-bounds.\n                    if or(shr(64, j), gt(add(batch.offset, batch.length), e)) {\n                        mstore(0x00, 0x3995943b) // `BatchOfBatchesDecodingError()`.\n                        revert(0x1c, 0x04)\n                    }\n                }\n                execute(mode, batch);\n            }\n        }\n    }\n\n    /// @dev Executes the calls.\n    /// Reverts and bubbles up error if any call fails.\n    /// The `mode` and `executionData` are passed along in case there's a need to use them.\n    function _execute(\n        bytes32 mode,\n        bytes calldata executionData,\n        Call[] calldata calls,\n        bytes calldata opData\n    ) internal virtual {\n        // Silence compiler warning on unused variables.\n        mode = mode;\n        executionData = executionData;\n        // Very basic auth to only allow this contract to be called by itself.\n        // Override this function to perform more complex auth with `opData`.\n        if (opData.length == uint256(0)) {\n            require(msg.sender == address(this));\n            // Remember to return `_execute(calls, extraData)` when you override this function.\n            return _execute(calls, bytes32(0));\n        }\n        revert(); // In your override, replace this with logic to operate on `opData`.\n    }\n\n    /// @dev Executes the calls.\n    /// Reverts and bubbles up error if any call fails.\n    /// `extraData` can be any supplementary data (e.g. a memory pointer, some hash).\n    function _execute(Call[] calldata calls, bytes32 extraData) internal virtual {\n        unchecked {\n            uint256 i;\n            if (calls.length == uint256(0)) return;\n            do {\n                (address to, uint256 value, bytes calldata data) = _get(calls, i);\n                _execute(to, value, data, extraData);\n            } while (++i != calls.length);\n        }\n    }\n\n    /// @dev Executes the call.\n    /// Reverts and bubbles up error if any call fails.\n    /// `extraData` can be any supplementary data (e.g. a memory pointer, some hash).\n    function _execute(address to, uint256 value, bytes calldata data, bytes32 extraData)\n        internal\n        virtual\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            extraData := extraData // Silence unused variable compiler warning.\n            let m := mload(0x40) // Grab the free memory pointer.\n            calldatacopy(m, data.offset, data.length)\n            if iszero(call(gas(), to, value, m, data.length, codesize(), 0x00)) {\n                // Bubble up the revert if the call reverts.\n                returndatacopy(m, 0x00, returndatasize())\n                revert(m, returndatasize())\n            }\n        }\n    }\n\n    /// @dev Convenience function for getting `calls[i]`, without bounds checks.\n    function _get(Call[] calldata calls, uint256 i)\n        internal\n        view\n        virtual\n        returns (address to, uint256 value, bytes calldata data)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let c := add(calls.offset, calldataload(add(calls.offset, shl(5, i))))\n            // Replaces `to` with `address(this)` if `address(0)` is provided.\n            let t := shr(96, shl(96, calldataload(c)))\n            to := or(mul(address(), iszero(t)), t)\n            value := calldataload(add(c, 0x20))\n            let o := add(c, calldataload(add(c, 0x40)))\n            data.offset := add(o, 0x20)\n            data.length := calldataload(o)\n        }\n    }\n}\n"},{"file_path":"dependencies/solady-0.1.26/src/accounts/Receiver.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Receiver mixin for ETH and safe-transferred ERC721 and ERC1155 tokens.\n/// @author Solady (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n///\n/// @dev Note:\n/// - Handles all ERC721 and ERC1155 token safety callbacks.\n/// - Collapses function table gas overhead and code size.\n/// - Utilizes fallback so unknown calldata will pass on.\nabstract contract Receiver {\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                       CUSTOM ERRORS                        */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev The function selector is not recognized.\n    error FnSelectorNotRecognized();\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                     RECEIVE / FALLBACK                     */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev For receiving ETH.\n    receive() external payable virtual {}\n\n    /// @dev Fallback function with the `receiverFallback` modifier.\n    fallback() external payable virtual receiverFallback {\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(0x00, 0x3c10b94e) // `FnSelectorNotRecognized()`.\n            revert(0x1c, 0x04)\n        }\n    }\n\n    /// @dev Modifier for the fallback function to handle token callbacks.\n    modifier receiverFallback() virtual {\n        _beforeReceiverFallbackBody();\n        if (_useReceiverFallbackBody()) {\n            /// @solidity memory-safe-assembly\n            assembly {\n                let s := shr(224, calldataload(0))\n                // 0x150b7a02: `onERC721Received(address,address,uint256,bytes)`.\n                // 0xf23a6e61: `onERC1155Received(address,address,uint256,uint256,bytes)`.\n                // 0xbc197c81: `onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)`.\n                if or(eq(s, 0x150b7a02), or(eq(s, 0xf23a6e61), eq(s, 0xbc197c81))) {\n                    // Assumes `mload(0x40) <= 0xffffffff` to save gas on cleaning lower bytes.\n                    mstore(0x20, s) // Store `msg.sig`.\n                    return(0x3c, 0x20) // Return `msg.sig`.\n                }\n            }\n        }\n        _afterReceiverFallbackBody();\n        _;\n    }\n\n    /// @dev Whether we want to use the body of the `receiverFallback` modifier.\n    function _useReceiverFallbackBody() internal view virtual returns (bool) {\n        return true;\n    }\n\n    /// @dev Called before the body of the `receiverFallback` modifier.\n    function _beforeReceiverFallbackBody() internal virtual {}\n\n    /// @dev Called after the body of the `receiverFallback` modifier.\n    function _afterReceiverFallbackBody() internal virtual {}\n}\n"},{"file_path":"dependencies/solady-0.1.26/src/utils/ECDSA.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n///   This is for more safety by default.\n///   Use the `tryRecover` variants if you need to get the zero address back\n///   upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n///   regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n///   See: https://eips.ethereum.org/EIPS/eip-2098\n///   This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT directly use signatures as unique identifiers:\n/// - The recovery operations do NOT check if a signature is non-malleable.\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n///   EIP-712 also enables readable signing of typed data for better user safety.\n/// - If you need a unique hash from a signature, please use the `canonicalHash` functions.\nlibrary ECDSA {\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                         CONSTANTS                          */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev The order of the secp256k1 elliptic curve.\n    uint256 internal constant N = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141;\n\n    /// @dev `N/2 + 1`. Used for checking the malleability of the signature.\n    uint256 private constant _HALF_N_PLUS_1 =\n        0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1;\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                        CUSTOM ERRORS                       */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev The signature is invalid.\n    error InvalidSignature();\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                    RECOVERY OPERATIONS                     */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n    function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            for { let m := mload(0x40) } 1 {\n                mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n                revert(0x1c, 0x04)\n            } {\n                switch mload(signature)\n                case 64 {\n                    let vs := mload(add(signature, 0x40))\n                    mstore(0x20, add(shr(255, vs), 27)) // `v`.\n                    mstore(0x60, shr(1, shl(1, vs))) // `s`.\n                }\n                case 65 {\n                    mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n                    mstore(0x60, mload(add(signature, 0x40))) // `s`.\n                }\n                default { continue }\n                mstore(0x00, hash)\n                mstore(0x40, mload(add(signature, 0x20))) // `r`.\n                result := mload(staticcall(gas(), 1, 0x00, 0x80, 0x01, 0x20))\n                mstore(0x60, 0) // Restore the zero slot.\n                mstore(0x40, m) // Restore the free memory pointer.\n                // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n                if returndatasize() { break }\n            }\n        }\n    }\n\n    /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n    function recoverCalldata(bytes32 hash, bytes calldata signature)\n        internal\n        view\n        returns (address result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            for { let m := mload(0x40) } 1 {\n                mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n                revert(0x1c, 0x04)\n            } {\n                switch signature.length\n                case 64 {\n                    let vs := calldataload(add(signature.offset, 0x20))\n                    mstore(0x20, add(shr(255, vs), 27)) // `v`.\n                    mstore(0x40, calldataload(signature.offset)) // `r`.\n                    mstore(0x60, shr(1, shl(1, vs))) // `s`.\n                }\n                case 65 {\n                    mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n                    calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n                }\n                default { continue }\n                mstore(0x00, hash)\n                result := mload(staticcall(gas(), 1, 0x00, 0x80, 0x01, 0x20))\n                mstore(0x60, 0) // Restore the zero slot.\n                mstore(0x40, m) // Restore the free memory pointer.\n                // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n                if returndatasize() { break }\n            }\n        }\n    }\n\n    /// @dev Recovers the signer's address from a message digest `hash`,\n    /// and the EIP-2098 short form signature defined by `r` and `vs`.\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let m := mload(0x40) // Cache the free memory pointer.\n            mstore(0x00, hash)\n            mstore(0x20, add(shr(255, vs), 27)) // `v`.\n            mstore(0x40, r)\n            mstore(0x60, shr(1, shl(1, vs))) // `s`.\n            result := mload(staticcall(gas(), 1, 0x00, 0x80, 0x01, 0x20))\n            // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n            if iszero(returndatasize()) {\n                mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n                revert(0x1c, 0x04)\n            }\n            mstore(0x60, 0) // Restore the zero slot.\n            mstore(0x40, m) // Restore the free memory pointer.\n        }\n    }\n\n    /// @dev Recovers the signer's address from a message digest `hash`,\n    /// and the signature defined by `v`, `r`, `s`.\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n        internal\n        view\n        returns (address result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let m := mload(0x40) // Cache the free memory pointer.\n            mstore(0x00, hash)\n            mstore(0x20, and(v, 0xff))\n            mstore(0x40, r)\n            mstore(0x60, s)\n            result := mload(staticcall(gas(), 1, 0x00, 0x80, 0x01, 0x20))\n            // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n            if iszero(returndatasize()) {\n                mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n                revert(0x1c, 0x04)\n            }\n            mstore(0x60, 0) // Restore the zero slot.\n            mstore(0x40, m) // Restore the free memory pointer.\n        }\n    }\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                   TRY-RECOVER OPERATIONS                   */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    // WARNING!\n    // These functions will NOT revert upon recovery failure.\n    // Instead, they will return the zero address upon recovery failure.\n    // It is critical that the returned address is NEVER compared against\n    // a zero address (e.g. an uninitialized address variable).\n\n    /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n    function tryRecover(bytes32 hash, bytes memory signature)\n        internal\n        view\n        returns (address result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            for { let m := mload(0x40) } 1 {} {\n                switch mload(signature)\n                case 64 {\n                    let vs := mload(add(signature, 0x40))\n                    mstore(0x20, add(shr(255, vs), 27)) // `v`.\n                    mstore(0x60, shr(1, shl(1, vs))) // `s`.\n                }\n                case 65 {\n                    mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n                    mstore(0x60, mload(add(signature, 0x40))) // `s`.\n                }\n                default { break }\n                mstore(0x00, hash)\n                mstore(0x40, mload(add(signature, 0x20))) // `r`.\n                pop(staticcall(gas(), 1, 0x00, 0x80, 0x40, 0x20))\n                mstore(0x60, 0) // Restore the zero slot.\n                // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n                result := mload(xor(0x60, returndatasize()))\n                mstore(0x40, m) // Restore the free memory pointer.\n                break\n            }\n        }\n    }\n\n    /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n    function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n        internal\n        view\n        returns (address result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            for { let m := mload(0x40) } 1 {} {\n                switch signature.length\n                case 64 {\n                    let vs := calldataload(add(signature.offset, 0x20))\n                    mstore(0x20, add(shr(255, vs), 27)) // `v`.\n                    mstore(0x40, calldataload(signature.offset)) // `r`.\n                    mstore(0x60, shr(1, shl(1, vs))) // `s`.\n                }\n                case 65 {\n                    mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n                    calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n                }\n                default { break }\n                mstore(0x00, hash)\n                pop(staticcall(gas(), 1, 0x00, 0x80, 0x40, 0x20))\n                mstore(0x60, 0) // Restore the zero slot.\n                // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n                result := mload(xor(0x60, returndatasize()))\n                mstore(0x40, m) // Restore the free memory pointer.\n                break\n            }\n        }\n    }\n\n    /// @dev Recovers the signer's address from a message digest `hash`,\n    /// and the EIP-2098 short form signature defined by `r` and `vs`.\n    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n        internal\n        view\n        returns (address result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let m := mload(0x40) // Cache the free memory pointer.\n            mstore(0x00, hash)\n            mstore(0x20, add(shr(255, vs), 27)) // `v`.\n            mstore(0x40, r)\n            mstore(0x60, shr(1, shl(1, vs))) // `s`.\n            pop(staticcall(gas(), 1, 0x00, 0x80, 0x40, 0x20))\n            mstore(0x60, 0) // Restore the zero slot.\n            // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n            result := mload(xor(0x60, returndatasize()))\n            mstore(0x40, m) // Restore the free memory pointer.\n        }\n    }\n\n    /// @dev Recovers the signer's address from a message digest `hash`,\n    /// and the signature defined by `v`, `r`, `s`.\n    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n        internal\n        view\n        returns (address result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let m := mload(0x40) // Cache the free memory pointer.\n            mstore(0x00, hash)\n            mstore(0x20, and(v, 0xff))\n            mstore(0x40, r)\n            mstore(0x60, s)\n            pop(staticcall(gas(), 1, 0x00, 0x80, 0x40, 0x20))\n            mstore(0x60, 0) // Restore the zero slot.\n            // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n            result := mload(xor(0x60, returndatasize()))\n            mstore(0x40, m) // Restore the free memory pointer.\n        }\n    }\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                     HASHING OPERATIONS                     */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n    /// This produces a hash corresponding to the one signed with the\n    /// [`eth_sign`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign)\n    /// JSON-RPC method as part of EIP-191.\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(0x20, hash) // Store into scratch space for keccak256.\n            mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n            result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n        }\n    }\n\n    /// @dev Returns an Ethereum Signed Message, created from `s`.\n    /// This produces a hash corresponding to the one signed with the\n    /// [`eth_sign`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign)\n    /// JSON-RPC method as part of EIP-191.\n    /// Note: Supports lengths of `s` up to 999999 bytes.\n    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let sLength := mload(s)\n            let o := 0x20\n            mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n            mstore(0x00, 0x00)\n            // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n            for { let temp := sLength } 1 {} {\n                o := sub(o, 1)\n                mstore8(o, add(48, mod(temp, 10)))\n                temp := div(temp, 10)\n                if iszero(temp) { break }\n            }\n            let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n            // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n            returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n            mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n            result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n            mstore(s, sLength) // Restore the length.\n        }\n    }\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                  CANONICAL HASH FUNCTIONS                  */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    // The following functions return the hash of the signature in its canonicalized format,\n    // which is the 65-byte `abi.encodePacked(r, s, uint8(v))`, where `v` is either 27 or 28.\n    // If `s` is greater than `N / 2` then it will be converted to `N - s`\n    // and the `v` value will be flipped.\n    // If the signature has an invalid length, or if `v` is invalid,\n    // a uniquely corrupt hash will be returned.\n    // These functions are useful for \"poor-mans-VRF\".\n\n    /// @dev Returns the canonical hash of `signature`.\n    function canonicalHash(bytes memory signature) internal pure returns (bytes32 result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let l := mload(signature)\n            for {} 1 {} {\n                mstore(0x00, mload(add(signature, 0x20))) // `r`.\n                let s := mload(add(signature, 0x40))\n                let v := mload(add(signature, 0x41))\n                if eq(l, 64) {\n                    v := add(shr(255, s), 27)\n                    s := shr(1, shl(1, s))\n                }\n                if iszero(lt(s, _HALF_N_PLUS_1)) {\n                    v := xor(v, 7)\n                    s := sub(N, s)\n                }\n                mstore(0x21, v)\n                mstore(0x20, s)\n                result := keccak256(0x00, 0x41)\n                mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n                break\n            }\n\n            // If the length is neither 64 nor 65, return a uniquely corrupted hash.\n            if iszero(lt(sub(l, 64), 2)) {\n                // `bytes4(keccak256(\"InvalidSignatureLength\"))`.\n                result := xor(keccak256(add(signature, 0x20), l), 0xd62f1ab2)\n            }\n        }\n    }\n\n    /// @dev Returns the canonical hash of `signature`.\n    function canonicalHashCalldata(bytes calldata signature)\n        internal\n        pure\n        returns (bytes32 result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            for {} 1 {} {\n                mstore(0x00, calldataload(signature.offset)) // `r`.\n                let s := calldataload(add(signature.offset, 0x20))\n                let v := calldataload(add(signature.offset, 0x21))\n                if eq(signature.length, 64) {\n                    v := add(shr(255, s), 27)\n                    s := shr(1, shl(1, s))\n                }\n                if iszero(lt(s, _HALF_N_PLUS_1)) {\n                    v := xor(v, 7)\n                    s := sub(N, s)\n                }\n                mstore(0x21, v)\n                mstore(0x20, s)\n                result := keccak256(0x00, 0x41)\n                mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n                break\n            }\n            // If the length is neither 64 nor 65, return a uniquely corrupted hash.\n            if iszero(lt(sub(signature.length, 64), 2)) {\n                calldatacopy(mload(0x40), signature.offset, signature.length)\n                // `bytes4(keccak256(\"InvalidSignatureLength\"))`.\n                result := xor(keccak256(mload(0x40), signature.length), 0xd62f1ab2)\n            }\n        }\n    }\n\n    /// @dev Returns the canonical hash of `signature`.\n    function canonicalHash(bytes32 r, bytes32 vs) internal pure returns (bytes32 result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(0x00, r) // `r`.\n            let v := add(shr(255, vs), 27)\n            let s := shr(1, shl(1, vs))\n            mstore(0x21, v)\n            mstore(0x20, s)\n            result := keccak256(0x00, 0x41)\n            mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n        }\n    }\n\n    /// @dev Returns the canonical hash of `signature`.\n    function canonicalHash(uint8 v, bytes32 r, bytes32 s) internal pure returns (bytes32 result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(0x00, r) // `r`.\n            if iszero(lt(s, _HALF_N_PLUS_1)) {\n                v := xor(v, 7)\n                s := sub(N, s)\n            }\n            mstore(0x21, v)\n            mstore(0x20, s)\n            result := keccak256(0x00, 0x41)\n            mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n        }\n    }\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                   EMPTY CALLDATA HELPERS                   */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev Returns an empty calldata bytes.\n    function emptySignature() internal pure returns (bytes calldata signature) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            signature.length := 0\n        }\n    }\n}\n"},{"file_path":"dependencies/solady-0.1.26/src/utils/LibCall.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Library for making calls.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibCall.sol)\n/// @author Modified from ExcessivelySafeCall (https://github.com/nomad-xyz/ExcessivelySafeCall)\n///\n/// @dev Note:\n/// - The arguments of the functions may differ from the libraries.\n///   Please read the functions carefully before use.\nlibrary LibCall {\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                       CUSTOM ERRORS                        */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev The target of the call is not a contract.\n    error TargetIsNotContract();\n\n    /// @dev The data is too short to contain a function selector.\n    error DataTooShort();\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                  CONTRACT CALL OPERATIONS                  */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    // These functions will revert if called on a non-contract\n    // (i.e. address without code).\n    // They will bubble up the revert if the call fails.\n\n    /// @dev Makes a call to `target`, with `data` and `value`.\n    function callContract(address target, uint256 value, bytes memory data)\n        internal\n        returns (bytes memory result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := mload(0x40)\n            if iszero(call(gas(), target, value, add(data, 0x20), mload(data), codesize(), 0x00)) {\n                // Bubble up the revert if the call reverts.\n                returndatacopy(result, 0x00, returndatasize())\n                revert(result, returndatasize())\n            }\n            if iszero(returndatasize()) {\n                if iszero(extcodesize(target)) {\n                    mstore(0x00, 0x5a836a5f) // `TargetIsNotContract()`.\n                    revert(0x1c, 0x04)\n                }\n            }\n            mstore(result, returndatasize()) // Store the length.\n            let o := add(result, 0x20)\n            returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n            mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n        }\n    }\n\n    /// @dev Makes a call to `target`, with `data`.\n    function callContract(address target, bytes memory data)\n        internal\n        returns (bytes memory result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := mload(0x40)\n            if iszero(call(gas(), target, 0, add(data, 0x20), mload(data), codesize(), 0x00)) {\n                // Bubble up the revert if the call reverts.\n                returndatacopy(result, 0x00, returndatasize())\n                revert(result, returndatasize())\n            }\n            if iszero(returndatasize()) {\n                if iszero(extcodesize(target)) {\n                    mstore(0x00, 0x5a836a5f) // `TargetIsNotContract()`.\n                    revert(0x1c, 0x04)\n                }\n            }\n            mstore(result, returndatasize()) // Store the length.\n            let o := add(result, 0x20)\n            returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n            mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n        }\n    }\n\n    /// @dev Makes a static call to `target`, with `data`.\n    function staticCallContract(address target, bytes memory data)\n        internal\n        view\n        returns (bytes memory result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := mload(0x40)\n            if iszero(staticcall(gas(), target, add(data, 0x20), mload(data), codesize(), 0x00)) {\n                // Bubble up the revert if the call reverts.\n                returndatacopy(result, 0x00, returndatasize())\n                revert(result, returndatasize())\n            }\n            if iszero(returndatasize()) {\n                if iszero(extcodesize(target)) {\n                    mstore(0x00, 0x5a836a5f) // `TargetIsNotContract()`.\n                    revert(0x1c, 0x04)\n                }\n            }\n            mstore(result, returndatasize()) // Store the length.\n            let o := add(result, 0x20)\n            returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n            mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n        }\n    }\n\n    /// @dev Makes a delegate call to `target`, with `data`.\n    function delegateCallContract(address target, bytes memory data)\n        internal\n        returns (bytes memory result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := mload(0x40)\n            if iszero(delegatecall(gas(), target, add(data, 0x20), mload(data), codesize(), 0x00)) {\n                // Bubble up the revert if the call reverts.\n                returndatacopy(result, 0x00, returndatasize())\n                revert(result, returndatasize())\n            }\n            if iszero(returndatasize()) {\n                if iszero(extcodesize(target)) {\n                    mstore(0x00, 0x5a836a5f) // `TargetIsNotContract()`.\n                    revert(0x1c, 0x04)\n                }\n            }\n            mstore(result, returndatasize()) // Store the length.\n            let o := add(result, 0x20)\n            returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n            mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n        }\n    }\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                    TRY CALL OPERATIONS                     */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    // These functions enable gas limited calls to be performed,\n    // with a cap on the number of return data bytes to be copied.\n    // The can be used to ensure that the calling contract will not\n    // run out-of-gas.\n\n    /// @dev Makes a call to `target`, with `data` and `value`.\n    /// The call is given a gas limit of `gasStipend`,\n    /// and up to `maxCopy` bytes of return data can be copied.\n    function tryCall(\n        address target,\n        uint256 value,\n        uint256 gasStipend,\n        uint16 maxCopy,\n        bytes memory data\n    ) internal returns (bool success, bool exceededMaxCopy, bytes memory result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := mload(0x40)\n            success :=\n                call(gasStipend, target, value, add(data, 0x20), mload(data), codesize(), 0x00)\n            let n := returndatasize()\n            if gt(returndatasize(), and(0xffff, maxCopy)) {\n                n := and(0xffff, maxCopy)\n                exceededMaxCopy := 1\n            }\n            mstore(result, n) // Store the length.\n            let o := add(result, 0x20)\n            returndatacopy(o, 0x00, n) // Copy the returndata.\n            mstore(0x40, add(o, n)) // Allocate the memory.\n        }\n    }\n\n    /// @dev Makes a call to `target`, with `data`.\n    /// The call is given a gas limit of `gasStipend`,\n    /// and up to `maxCopy` bytes of return data can be copied.\n    function tryStaticCall(address target, uint256 gasStipend, uint16 maxCopy, bytes memory data)\n        internal\n        view\n        returns (bool success, bool exceededMaxCopy, bytes memory result)\n    {\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := mload(0x40)\n            success :=\n                staticcall(gasStipend, target, add(data, 0x20), mload(data), codesize(), 0x00)\n            let n := returndatasize()\n            if gt(returndatasize(), and(0xffff, maxCopy)) {\n                n := and(0xffff, maxCopy)\n                exceededMaxCopy := 1\n            }\n            mstore(result, n) // Store the length.\n            let o := add(result, 0x20)\n            returndatacopy(o, 0x00, n) // Copy the returndata.\n            mstore(0x40, add(o, n)) // Allocate the memory.\n        }\n    }\n\n    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n    /*                      OTHER OPERATIONS                      */\n    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n    /// @dev Bubbles up the revert.\n    function bubbleUpRevert(bytes memory revertReturnData) internal pure {\n        /// @solidity memory-safe-assembly\n        assembly {\n            revert(add(0x20, revertReturnData), mload(revertReturnData))\n        }\n    }\n\n    /// @dev In-place replaces the function selector of encoded contract call data.\n    function setSelector(bytes4 newSelector, bytes memory data) internal pure {\n        /// @solidity memory-safe-assembly\n        assembly {\n            if iszero(gt(mload(data), 0x03)) {\n                mstore(0x00, 0x0acec8bd) // `DataTooShort()`.\n                revert(0x1c, 0x04)\n            }\n            let o := add(data, 0x20)\n            mstore(o, or(shr(32, shl(32, mload(o))), newSelector))\n        }\n    }\n}\n"}],"is_verified_via_sourcify":false,"can_be_visualized_via_sol2uml":true,"evm_version":"prague","language":"solidity","is_verified_via_eth_bytecode_db":false,"is_fully_verified":false,"license_type":"none","is_blueprint":false,"name":"BatchExecutor","creation_bytecode":"0x608080604052346015576107ec908161001a8239f35b5f80fdfe608080604052600436101561004e575b50361561004c575f3560e01c63bc197c81811463f23a6e6182141763150b7a0282141761004357633c10b94e5f526004601cfd5b6020526020603cf35b005b5f3560e01c9081631626ba7e146100d457508063d03c79141461008d5763e9ae5c531461007b575f61000f565b61004c61008736610194565b916104a7565b346100d05760203660031901126100d057602060043561010160f01b81149081156100be575b506040519015158152f35b6100c8915061071c565b1515826100b3565b5f80fd5b346100d0576100e236610194565b9291905f938060401461016957604114610137575050505b6001600160a01b03163003610127576020630b135d3f60e11b5b6040516001600160e01b03199091168152f35b60206001600160e01b0319610114565b604080929394508101355f1a60205281375b5f526020604060805f60015afa505f6060523d60601851906040526100fa565b5060208082013560ff81901c601b0190915290356040526001600160ff1b0316606052909150610149565b60406003198201126100d057600435916024356001600160401b0381116100d057826023820112156100d0578060040135926001600160401b0384116100d057602484830101116100d0576024019190565b156100d057565b6040519190601f01601f191682016001600160401b0381118382101761021257604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b0381116102125760051b60200190565b91906040838203126100d05782356001600160401b0381116100d057830181601f820112156100d05780359061027a61027583610226565b6101ed565b9160208084838152019160051b830101918483116100d05760208101915b83831061030c5750505050926020810135906001600160401b0382116100d057019080601f830112156100d05781356102d361027582610226565b9260208085848152019260051b8201019283116100d057602001905b8282106102fc5750505090565b81358152602091820191016102ef565b82356001600160401b0381116100d0578201906060828803601f1901126100d05760405191606083018381106001600160401b038211176102125760405260208101356001600160a01b03811681036100d05783526040810135602084015260608101356001600160401b0381116100d05760209101019087601f830112156100d0578135926001600160401b038411610212576103b3601f8501601f19166020016101ed565b84815289602086860101116100d0575f60208681978280980183860137830101526040820152815201920191610298565b156103eb57565b631fec674760e31b5f5260045ffd5b90603f820291808304603f149015171561041057565b634e487b7160e01b5f52601160045260245ffd5b80518210156104385760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b90619c40820180921161041057565b156104635750565b63b22db89560e01b5f5260045260245ffd5b9060609260209183526040828401528051918291826040860152018484015e5f828201840152601f01601f1916010190565b9161feff60f01b83016105e2576104cc92506104c43033146101e6565b81019061023d565b91906104db81518451146103e4565b5f5b81518110156105dc57806105196001926104ff6104f95a6103fa565b60061c90565b61051261050c838a610424565b5161044c565b111561045b565b6105436105376105298386610424565b51516001600160a01b031690565b6001600160a01b031690565b6105c75761057c305b60206105588487610424565b5101516105658489610424565b519060406105738689610424565b510151926106db565b9190501561058c575b50016104dd565b6105be7fe723f28f104e46b47fd3531f3608374ac226bcf3ddda334a23a266453e0efdb7916040519182918583610475565b0390a15f610585565b61057c6105d76105298386610424565b61054c565b50509050565b906105ec926105ee565b565b916105f88361071c565b9260038414610654575050368215610647576105ec925f92803591600283830193604011911411610630575b50602081359101610758565b91509150806020013501602081019035915f610624565b637f1812755f526004601cfd5b90919250600360b01b189082359182840192828435950192602084818860051b880101119110179060401c176106ce575f5b848103610694575050505050565b60208160051b850101358085019060208201359085604083850101119060401c176106ce5760406106c69201846104a7565b600101610686565b633995943b5f526004601cfd5b5f919293829460405194389360208451940192f1923d6108003d1161070f575b806020918452805f8386013e830101604052565b50600192506108006106fb565b69ffff00000000ffffffff9060b01c166901000000000078210002600160481b82146901000000000078210001831460011b1791146003021790565b9290915015610765575f80fd5b3033036100d0575f906105ec81156107d95760015b156107cc575b5f60205f8560051b870135870160018060a01b0381351660408201358201803591826040519687930183376020389401359080153002175af1156107c4575061077a565b3d5f823e3d90fd5b9160010191818303610780575b9250505056fea164736f6c6343000821000a","external_libraries":[],"proxy_type":null,"implementations":[],"verified_at":"2026-10-07T01:22:20.715941Z","is_verified_via_verifier_alliance":false,"compiler_version":"v0.8.33+commit.64118f21","decoded_constructor_args":null,"sourcify_repo_url":null,"optimization_runs":100,"compiler_settings":{"evmVersion":"prague","libraries":{},"metadata":{"appendCBOR":true,"bytecodeHash":"none","useLiteralContent":false},"optimizer":{"enabled":true,"runs":100},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["@steakhouse/deploy-kit/=../deploy-kit/src/","forge-std/=dependencies/forge-std-c7be2a3/src/","solady/=dependencies/solady-0.1.26/src/"],"viaIR":true},"is_verified":true,"verified_twin_address_hash":null,"optimization_enabled":true,"deployed_bytecode":"0x608080604052600436101561004e575b50361561004c575f3560e01c63bc197c81811463f23a6e6182141763150b7a0282141761004357633c10b94e5f526004601cfd5b6020526020603cf35b005b5f3560e01c9081631626ba7e146100d457508063d03c79141461008d5763e9ae5c531461007b575f61000f565b61004c61008736610194565b916104a7565b346100d05760203660031901126100d057602060043561010160f01b81149081156100be575b506040519015158152f35b6100c8915061071c565b1515826100b3565b5f80fd5b346100d0576100e236610194565b9291905f938060401461016957604114610137575050505b6001600160a01b03163003610127576020630b135d3f60e11b5b6040516001600160e01b03199091168152f35b60206001600160e01b0319610114565b604080929394508101355f1a60205281375b5f526020604060805f60015afa505f6060523d60601851906040526100fa565b5060208082013560ff81901c601b0190915290356040526001600160ff1b0316606052909150610149565b60406003198201126100d057600435916024356001600160401b0381116100d057826023820112156100d0578060040135926001600160401b0384116100d057602484830101116100d0576024019190565b156100d057565b6040519190601f01601f191682016001600160401b0381118382101761021257604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b0381116102125760051b60200190565b91906040838203126100d05782356001600160401b0381116100d057830181601f820112156100d05780359061027a61027583610226565b6101ed565b9160208084838152019160051b830101918483116100d05760208101915b83831061030c5750505050926020810135906001600160401b0382116100d057019080601f830112156100d05781356102d361027582610226565b9260208085848152019260051b8201019283116100d057602001905b8282106102fc5750505090565b81358152602091820191016102ef565b82356001600160401b0381116100d0578201906060828803601f1901126100d05760405191606083018381106001600160401b038211176102125760405260208101356001600160a01b03811681036100d05783526040810135602084015260608101356001600160401b0381116100d05760209101019087601f830112156100d0578135926001600160401b038411610212576103b3601f8501601f19166020016101ed565b84815289602086860101116100d0575f60208681978280980183860137830101526040820152815201920191610298565b156103eb57565b631fec674760e31b5f5260045ffd5b90603f820291808304603f149015171561041057565b634e487b7160e01b5f52601160045260245ffd5b80518210156104385760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b90619c40820180921161041057565b156104635750565b63b22db89560e01b5f5260045260245ffd5b9060609260209183526040828401528051918291826040860152018484015e5f828201840152601f01601f1916010190565b9161feff60f01b83016105e2576104cc92506104c43033146101e6565b81019061023d565b91906104db81518451146103e4565b5f5b81518110156105dc57806105196001926104ff6104f95a6103fa565b60061c90565b61051261050c838a610424565b5161044c565b111561045b565b6105436105376105298386610424565b51516001600160a01b031690565b6001600160a01b031690565b6105c75761057c305b60206105588487610424565b5101516105658489610424565b519060406105738689610424565b510151926106db565b9190501561058c575b50016104dd565b6105be7fe723f28f104e46b47fd3531f3608374ac226bcf3ddda334a23a266453e0efdb7916040519182918583610475565b0390a15f610585565b61057c6105d76105298386610424565b61054c565b50509050565b906105ec926105ee565b565b916105f88361071c565b9260038414610654575050368215610647576105ec925f92803591600283830193604011911411610630575b50602081359101610758565b91509150806020013501602081019035915f610624565b637f1812755f526004601cfd5b90919250600360b01b189082359182840192828435950192602084818860051b880101119110179060401c176106ce575f5b848103610694575050505050565b60208160051b850101358085019060208201359085604083850101119060401c176106ce5760406106c69201846104a7565b600101610686565b633995943b5f526004601cfd5b5f919293829460405194389360208451940192f1923d6108003d1161070f575b806020918452805f8386013e830101604052565b50600192506108006106fb565b69ffff00000000ffffffff9060b01c166901000000000078210002600160481b82146901000000000078210001831460011b1791146003021790565b9290915015610765575f80fd5b3033036100d0575f906105ec81156107d95760015b156107cc575b5f60205f8560051b870135870160018060a01b0381351660408201358201803591826040519687930183376020389401359080153002175af1156107c4575061077a565b3d5f823e3d90fd5b9160010191818303610780575b9250505056fea164736f6c6343000821000a","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.33;\n\nimport {ERC7821} from \"solady/accounts/ERC7821.sol\";\nimport {ECDSA} from \"solady/utils/ECDSA.sol\";\nimport {LibCall} from \"solady/utils/LibCall.sol\";\n\n/// @title BatchExecutor\n/// @notice The code a bot's EOA delegates to with EIP-7702. One transaction from the bot to itself then runs many\n/// calls, and every target still sees the bot as `msg.sender`. It keeps no state, and only the account itself can\n/// make it execute anything: every mode of `execute` requires `msg.sender == address(this)`.\n/// @dev Solady's ERC7821 gives the plain batch (mode `0x01000000000000000000…`), which reverts as a whole when one\n/// call fails, the batch with `opData` (`0x01000000000078210001…`, only with empty `opData`) and the batch of\n/// batches (`0x01000000000078210002…`). This contract adds the try mode, whose calls are independent of each other.\n/// A group of calls that must succeed or fail together is one try-mode entry that calls the account itself\n/// (`to` is the account, or `address(0)`) with `execute(<plain batch mode>, abi.encode(calls))`: a failure inside\n/// the group rolls back the group alone, and the next entries still run.\n/// The ERC-721 and ERC-1155 receiver hooks and the empty `receive` come from Solady's Receiver; any other unknown\n/// selector reverts.\ncontract BatchExecutor is ERC7821 {\n    /// @dev The try mode: call type batch (`0x01`), exec type try (`0x01`), every other byte zero.\n    bytes32 internal constant TRY_MODE = 0x0101000000000000000000000000000000000000000000000000000000000000;\n\n    /// @notice A try-mode entry failed. `result` is what it returned, cut to its first 2048 bytes. The event of the\n    /// ERC-7579 reference implementation, which MetaMask's DeleGator and Kernel emit too.\n    event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n    /// @notice The try mode's `calls` and `gasLimits` have different lengths.\n    error LengthMismatch();\n\n    /// @notice The transaction has too little gas left to give entry `index` its whole gas limit.\n    error InsufficientGas(uint256 index);\n\n    /// @notice Runs the calls of `executionData` as `mode` says (see the contract's notes for the modes).\n    /// @dev In the try mode, `executionData` is `abi.encode(Call[] calls, uint256[] gasLimits)`. Each entry calls\n    /// `calls[i].to` (the account itself when it is `address(0)`) with its value and data and at most `gasLimits[i]`\n    /// gas, and keeps at most 2048 bytes of what it returns. A failed entry emits `TryExecuteUnsuccessful` and the\n    /// next one runs. Before each call, the whole transaction reverts with `InsufficientGas(i)` unless 63/64 of the\n    /// gas left (EIP-150), net of what the call itself costs, covers `gasLimits[i]`: an entry never runs with less\n    /// than its limit, so `eth_estimateGas` returns a limit at which every entry gets its whole budget, not one at\n    /// which an entry, or a contract it calls, runs out of gas and only reports a failure.\n    function execute(bytes32 mode, bytes calldata executionData) public payable override {\n        if (mode != TRY_MODE) return super.execute(mode, executionData);\n        require(msg.sender == address(this));\n        (Call[] memory calls, uint256[] memory gasLimits) = abi.decode(executionData, (Call[], uint256[]));\n        require(calls.length == gasLimits.length, LengthMismatch());\n        for (uint256 i; i < calls.length; ++i) {\n            // 40,000 covers what a call costs before its callee runs: at most 36,600 (a cold account, a value\n            // transfer and a new account), plus the few instructions between here and the call.\n            require(gasleft() * 63 / 64 >= gasLimits[i] + 40_000, InsufficientGas(i));\n            address to = calls[i].to == address(0) ? address(this) : calls[i].to;\n            (bool success,, bytes memory result) =\n                LibCall.tryCall(to, calls[i].value, gasLimits[i], 2048, calls[i].data);\n            if (!success) emit TryExecuteUnsuccessful(i, result);\n        }\n    }\n\n    /// @notice Whether `execute` supports `mode`: Solady's modes and the try mode.\n    function supportsExecutionMode(bytes32 mode) public view override returns (bool) {\n        return mode == TRY_MODE || super.supportsExecutionMode(mode);\n    }\n\n    /// @notice ERC-1271: `signature` is valid when the account's own key signed `hash`. Contracts that see code at\n    /// the bot's address (Permit2, OpenZeppelin's SignatureChecker) ask this instead of recovering the signer.\n    /// @return The ERC-1271 magic value `0x1626ba7e` for a valid signature, `0xffffffff` otherwise; it never reverts.\n    function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4) {\n        return ECDSA.tryRecoverCalldata(hash, signature) == address(this)\n            ? this.isValidSignature.selector\n            : bytes4(0xffffffff);\n    }\n}\n","creation_status":"success","file_path":"src/BatchExecutor.sol"}