ETH Price: $2,962.53 (+0.45%)

Contract

0xdE167bB9F640a3D6de7b8C16C28920755f5921F2

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Transaction Hash
Block
From
To
Send282621142026-01-24 14:36:3834 mins ago1769265398IN
0xdE167bB9...55f5921F2
0 ETH0.000008010.04150159
Send282620732026-01-24 14:35:0836 mins ago1769265308IN
0xdE167bB9...55f5921F2
0 ETH0.000008410.0419268
Send282620472026-01-24 14:34:0837 mins ago1769265248IN
0xdE167bB9...55f5921F2
0 ETH0.000009080.04174719
Send282555262026-01-24 10:39:344 hrs ago1769251174IN
0xdE167bB9...55f5921F2
0.00056069 ETH0.000007660.04318528
Send282554562026-01-24 10:37:004 hrs ago1769251020IN
0xdE167bB9...55f5921F2
0.00056069 ETH0.000007840.04310036
Send282539242026-01-24 9:42:405 hrs ago1769247760IN
0xdE167bB9...55f5921F2
0 ETH0.000023470.083808
Send282150342026-01-23 9:11:3029 hrs ago1769159490IN
0xdE167bB9...55f5921F2
0 ETH0.000011790.04210574
Send282140992026-01-23 8:39:2830 hrs ago1769157568IN
0xdE167bB9...55f5921F2
0.00039 ETH0.000017880.0812024
Send282139602026-01-23 8:34:4630 hrs ago1769157286IN
0xdE167bB9...55f5921F2
0.0001697 ETH0.000005560.083808
Send282137432026-01-23 8:26:4830 hrs ago1769156808IN
0xdE167bB9...55f5921F2
0.00017526 ETH0.000005560.083808
Send282137282026-01-23 8:26:1830 hrs ago1769156778IN
0xdE167bB9...55f5921F2
0.00018083 ETH0.000005560.083808
Send282137092026-01-23 8:25:3230 hrs ago1769156732IN
0xdE167bB9...55f5921F2
0 ETH0.000030580.083808
Send282043622026-01-23 2:51:0036 hrs ago1769136660IN
0xdE167bB9...55f5921F2
0 ETH0.000013560.04842335
Send282035092026-01-23 2:22:3036 hrs ago1769134950IN
0xdE167bB9...55f5921F2
0 ETH0.000013150.04696395
Send281958852026-01-22 22:05:1041 hrs ago1769119510IN
0xdE167bB9...55f5921F2
0 ETH0.000015190.04123304
Send281930432026-01-22 20:29:1642 hrs ago1769113756IN
0xdE167bB9...55f5921F2
0 ETH0.00001440.03937038
Send281893022026-01-22 18:23:5244 hrs ago1769106232IN
0xdE167bB9...55f5921F2
0.00751319 ETH0.000005750.04071519
Send281843952026-01-22 15:39:0647 hrs ago1769096346IN
0xdE167bB9...55f5921F2
0 ETH0.00000920.03972678
Send281819292026-01-22 14:16:442 days ago1769091404IN
0xdE167bB9...55f5921F2
0 ETH0.000008670.041904
Send281797412026-01-22 13:03:402 days ago1769087020IN
0xdE167bB9...55f5921F2
0 ETH0.000017990.03904766
Send281539092026-01-21 22:23:262 days ago1769034206IN
0xdE167bB9...55f5921F2
0.00415413 ETH0.00000950.04325345
Send281538672026-01-21 22:21:562 days ago1769034116IN
0xdE167bB9...55f5921F2
0 ETH0.000011790.04210574
Send281334682026-01-21 10:53:143 days ago1768992794IN
0xdE167bB9...55f5921F2
0.00037 ETH0.000007270.04101048
Send281325422026-01-21 10:22:023 days ago1768990922IN
0xdE167bB9...55f5921F2
0 ETH0.000009190.03972896
Send281212092026-01-21 4:00:383 days ago1768968038IN
0xdE167bB9...55f5921F2
0 ETH0.000015210.03937004
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
282621142026-01-24 14:36:3834 mins ago1769265398
0xdE167bB9...55f5921F2
0 ETH
282621142026-01-24 14:36:3834 mins ago1769265398
0xdE167bB9...55f5921F2
0 ETH
282621142026-01-24 14:36:3834 mins ago1769265398
0xdE167bB9...55f5921F2
0 ETH
282621142026-01-24 14:36:3834 mins ago1769265398
0xdE167bB9...55f5921F2
0 ETH
282621142026-01-24 14:36:3834 mins ago1769265398
0xdE167bB9...55f5921F2
0 ETH
282620732026-01-24 14:35:0836 mins ago1769265308
0xdE167bB9...55f5921F2
0 ETH
282620732026-01-24 14:35:0836 mins ago1769265308
0xdE167bB9...55f5921F2
0 ETH
282620732026-01-24 14:35:0836 mins ago1769265308
0xdE167bB9...55f5921F2
0 ETH
282620732026-01-24 14:35:0836 mins ago1769265308
0xdE167bB9...55f5921F2
0 ETH
282620732026-01-24 14:35:0836 mins ago1769265308
0xdE167bB9...55f5921F2
0 ETH
282620472026-01-24 14:34:0837 mins ago1769265248
0xdE167bB9...55f5921F2
0 ETH
282620472026-01-24 14:34:0837 mins ago1769265248
0xdE167bB9...55f5921F2
0 ETH
282620472026-01-24 14:34:0837 mins ago1769265248
0xdE167bB9...55f5921F2
0 ETH
282620472026-01-24 14:34:0837 mins ago1769265248
0xdE167bB9...55f5921F2
0 ETH
282620472026-01-24 14:34:0837 mins ago1769265248
0xdE167bB9...55f5921F2
0 ETH
282555262026-01-24 10:39:344 hrs ago1769251174
0xdE167bB9...55f5921F2
0.00056069 ETH
282554562026-01-24 10:37:004 hrs ago1769251020
0xdE167bB9...55f5921F2
0.00056069 ETH
282539242026-01-24 9:42:405 hrs ago1769247760
0xdE167bB9...55f5921F2
0 ETH
282539242026-01-24 9:42:405 hrs ago1769247760
0xdE167bB9...55f5921F2
0 ETH
282539242026-01-24 9:42:405 hrs ago1769247760
0xdE167bB9...55f5921F2
0 ETH
282539242026-01-24 9:42:405 hrs ago1769247760
0xdE167bB9...55f5921F2
0 ETH
282539242026-01-24 9:42:405 hrs ago1769247760
0xdE167bB9...55f5921F2
0 ETH
282150342026-01-23 9:11:3029 hrs ago1769159490
0xdE167bB9...55f5921F2
0 ETH
282150342026-01-23 9:11:3029 hrs ago1769159490
0xdE167bB9...55f5921F2
0 ETH
282150342026-01-23 9:11:3029 hrs ago1769159490
0xdE167bB9...55f5921F2
0 ETH
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
XChainSenderNoTransient

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
london EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

import {ERC20} from "solmate/src/tokens/ERC20.sol";
import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";
import {SafeTransferLib} from "solmate/src/utils/SafeTransferLib.sol";
import {ReentrancyGuard} from "solmate/src/utils/ReentrancyGuard.sol";
import {PCSOrderData, PCSCommand, Permit2Data} from "./libraries/PCSOrder.sol";
import {LibAddress} from "./libraries/LibAddress.sol";
import {Commands} from "./libraries/Commands.sol";
import {Dispatcher} from "./Dispatcher.sol";
import {Constants} from "./libraries/Constants.sol";
import {IAllowanceTransfer} from "permit2/src/interfaces/IAllowanceTransfer.sol";
import {SafeCastLib} from "solmate/src/utils/SafeCastLib.sol";

/// @dev This contract is similar to XChainSender but do not use transient storage
///            Only deployed on chains without push0 support eg. linea
contract XChainSenderNoTransient is Dispatcher, ReentrancyGuard, Pausable {
    using SafeTransferLib for ERC20;
    using LibAddress for address;
    using LibAddress for bytes32;
    using SafeCastLib for uint256;

    /// @notice thrown when msg.value is not equal to order amount
    error InsufficientSendBalance();
    /// @notice thrown when more than 1 bridge command is found
    error MoreThanOneBridgeCommand();
    /// @notice thrown when swap command is found after bridge command
    error NoSwapAfterBridgeCommand();

    event Send(bytes32 indexed orderId, bytes order);

    uint256 public numberOfOrders;
    address public immutable PERMIT2;

    constructor(address owner, address weth, address permit2) Dispatcher(owner, weth) {
        PERMIT2 = permit2;
    }

    /// @notice Entry point to begin a cross-chain swap
    /// @param order Order data containing the input token, amount, commands to execute and permit2 data
    function send(PCSOrderData calldata order) external payable nonReentrant whenNotPaused {
        if (order.inputToken.toAddress() == Constants.ETH) {
            if (msg.value != order.inputAmount) {
                revert InsufficientSendBalance();
            }
        } else {
            if (order.permit2Data.length > 0) {
                // use permit2
                Permit2Data memory permit2Data = abi.decode(order.permit2Data, (Permit2Data));

                /// @dev even if permit2.permit fails (in case frontrun), continue to proceed
                PERMIT2.call(
                    abi.encodeWithSignature(
                        "permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)",
                        msg.sender,
                        permit2Data.permitSingle,
                        permit2Data.signature
                    )
                );

                IAllowanceTransfer(PERMIT2).transferFrom(
                    msg.sender, address(this), order.inputAmount.safeCastTo160(), order.inputToken.toAddress()
                );
            } else {
                ERC20(order.inputToken.toAddress()).safeTransferFrom(msg.sender, address(this), order.inputAmount);
            }
        }

        bytes32 orderId = getNextOrderId();
        dispatch(orderId, order.commands);

        emit Send(orderId, abi.encode(order));

        numberOfOrders += 1;
    }

    /// @notice return the next generated orderId
    function getNextOrderId() public view returns (bytes32) {
        return keccak256(abi.encode(address(this), numberOfOrders, block.chainid));
    }

    /**
     * @dev called by the owner to pause, triggers stopped state
     */
    function pause() external onlyOwner whenNotPaused {
        _pause();
    }

    /**
     * @dev called by the owner to unpause, returns to normal state
     */
    function unpause() external onlyOwner whenPaused {
        _unpause();
    }

    /// @dev validate the commands before executing: max only 1 bridge command
    function _validateCommands(PCSCommand[] memory pcsCommands) internal pure override {
        uint256 totalBridgeCommand;

        for (uint256 i = 0; i < pcsCommands.length; i++) {
            uint256 command = pcsCommands[i].command;

            if (command == Commands.BRIDGE) totalBridgeCommand++;

            // only 1 bridge command expected
            if (totalBridgeCommand > 1) revert MoreThanOneBridgeCommand();

            // no swap on source chain after bridge command
            if (totalBridgeCommand == 1 && command == Commands.SWAP) revert NoSwapAfterBridgeCommand();
        }
    }

    /// @notice Receive native asset directly.
    receive() external payable {}
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
library SafeTransferLib {
    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument.
            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
            success := call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)

            // Set success to whether the call reverted, if not we check it either
            // returned exactly 1 (can't just be non-zero data), or had no return data and token has code.
            if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) {
                success := iszero(or(iszero(extcodesize(token)), returndatasize())) 
            }
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
            success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)

            // Set success to whether the call reverted, if not we check it either
            // returned exactly 1 (can't just be non-zero data), or had no return data and token has code.
            if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) {
                success := iszero(or(iszero(extcodesize(token)), returndatasize())) 
            }
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
            success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)

            // Set success to whether the call reverted, if not we check it either
            // returned exactly 1 (can't just be non-zero data), or had no return data and token has code.
            if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) {
                success := iszero(or(iszero(extcodesize(token)), returndatasize())) 
            }
        }

        require(success, "APPROVE_FAILED");
    }
}

File 5 of 22 : ReentrancyGuard.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Gas optimized reentrancy protection for smart contracts.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ReentrancyGuard.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
abstract contract ReentrancyGuard {
    uint256 private locked = 1;

    modifier nonReentrant() virtual {
        require(locked == 1, "REENTRANCY");

        locked = 2;

        _;

        locked = 1;
    }
}

File 6 of 22 : PCSOrder.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IAllowanceTransfer} from "permit2/src/interfaces/IAllowanceTransfer.sol";

struct PCSCommand {
    /// @notice command type
    uint256 command;
    /// @notice command data, abi encoded data for the command
    bytes commandData;
}

struct PCSOrderData {
    /// @notice input token address. set as Constant.ETH for native token
    bytes32 inputToken;
    /// @notice input amount
    uint256 inputAmount;
    /// @notice list of PCS commands to execute
    PCSCommand[] commands;
    /// @notice permit2 data abi.encode(Permit2Data)
    /// @dev if permit2Data length=0, input token will be transfer via token.safeTransferFrom
    /// @dev if permit2Data is set, input token will be transfer via permit2.transferFrom
    bytes permit2Data;
}

struct Permit2Data {
    /// @notice permit2 permitSingle
    IAllowanceTransfer.PermitSingle permitSingle;
    /// @notice permit2 signature
    bytes signature;
}

/// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

/// @title LibAddress
/// @notice Utility method for address
library LibAddress {
    error InvalidBytes32Address();

    function toAddress(bytes32 _bytes32) internal pure returns (address) {
        if (uint256(_bytes32) >> 160 != 0) {
            revert InvalidBytes32Address();
        }
        return address(uint160(uint256(_bytes32)));
    }

    function toBytes32(address _address) internal pure returns (bytes32) {
        return bytes32(uint256(uint160(_address)));
    }

    function isNative(address _address) internal pure returns (bool) {
        return _address == address(0);
    }
}

File 8 of 22 : Commands.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library Commands {
    /// @notice for swapping tokens
    uint256 constant SWAP = 0x00;

    /// @notice for bridging token to another chain
    uint256 constant BRIDGE = 0x01;

    /// @notice for sweeping token from contract
    uint256 constant SWEEP = 0x02;

    /// @notice for transferring token (or native eth) from contract
    uint256 constant TRANSFER = 0x03;

    /// @notice for wrapping WETH->ETH
    uint256 constant WRAP_ETH = 0x04;

    /// @notice for ybwrapping ETH->WETH
    uint256 constant UNWRAP_WETH = 0x05;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

import {PCSCommand} from "./libraries/PCSOrder.sol";
import {Commands} from "./libraries/Commands.sol";
import {ERC20} from "solmate/src/tokens/ERC20.sol";
import {SafeTransferLib} from "solmate/src/utils/SafeTransferLib.sol";
import {LibAddress} from "./libraries/LibAddress.sol";
import {IBridgeAdapter, BridgeData} from "./interfaces/IBridgeAdapter.sol";
import {IDispatcher} from "./interfaces/IDispatcher.sol";
import {Ownable2Step, Ownable} from "@openzeppelin/contracts/access/Ownable2Step.sol";
import {SwapData} from "./interfaces/ISwapAdapter.sol";
import {Payments} from "./libraries/Payments.sol";
import {Constants} from "./libraries/Constants.sol";

abstract contract Dispatcher is IDispatcher, Ownable2Step, Payments {
    using SafeTransferLib for ERC20;
    using LibAddress for bytes32;

    error DisallowCombination();

    // keccak256(abi.encode(address target, bytes4 selector)) => bool
    mapping(bytes32 => bool) swapFunctionWhitelisted;
    mapping(address => bool) public isBridgeAdapterWhitelisted;

    constructor(address owner, address weth) Ownable(owner) Payments(weth) {}

    function dispatch(bytes32 orderId, PCSCommand[] memory pcsCommands) internal {
        _validateCommands(pcsCommands);

        for (uint8 i = 0; i < pcsCommands.length; i++) {
            PCSCommand memory pcsCommand = pcsCommands[i];

            // 0x00 to 0x02
            if (pcsCommand.command < Commands.TRANSFER) {
                if (pcsCommand.command == Commands.SWAP) {
                    // swap related logic
                    SwapData memory swapData = abi.decode(pcsCommand.commandData, (SwapData));
                    if (!isSwapFunctionWhitelisted(swapData.target, swapData.input)) {
                        revert SwapFunctionNotWhitelisted();
                    }

                    uint256 inputAmount = swapData.inputAmount;
                    address inputToken = swapData.inputToken;

                    bool success;
                    if (inputToken != Constants.ETH) {
                        // this check prevent approve from  failing or using only a portion of the funds
                        // since we cannot update the amount in swapData.input
                        if (inputAmount == Constants.CONTRACT_BALANCE && !swapData.shouldTransferTokensBeforeSwap) {
                            revert DisallowCombination();
                        }

                        if (inputAmount == Constants.CONTRACT_BALANCE) {
                            inputAmount = ERC20(inputToken).balanceOf(address(this));
                        }
                        // if inputToken is native, it will be sent with the transaction
                        if (swapData.shouldTransferTokensBeforeSwap) {
                            ERC20(inputToken).safeTransfer(swapData.target, inputAmount);
                        } else {
                            ERC20(inputToken).safeApprove(swapData.target, inputAmount);
                        }

                        (success,) = swapData.target.call(swapData.input);

                        if (
                            !swapData.shouldTransferTokensBeforeSwap
                                && ERC20(inputToken).allowance(address(this), swapData.target) > 0
                        ) {
                            // safe practice: reset approval to 0 after swap
                            // the return value of the call is not checked, because it can be a non-standard ERC20 token like BNB on ETH
                            inputToken.call(abi.encodeWithSignature("approve(address,uint256)", swapData.target, 0));
                        }
                    } else {
                        // no need to check disallow combination since we always transfer native token to target
                        if (inputAmount == Constants.CONTRACT_BALANCE) {
                            inputAmount = address(this).balance;
                        }
                        (success,) = swapData.target.call{value: inputAmount}(swapData.input);
                    }

                    if (!success) revert FailSwapCall(orderId, swapData.target);
                } else if (pcsCommand.command == Commands.BRIDGE) {
                    // bridge related logic
                    (BridgeData memory bridgeData) = abi.decode(pcsCommand.commandData, (BridgeData));
                    address bridgeAdapter = bridgeData.target;

                    if (!isBridgeAdapterWhitelisted[bridgeAdapter]) {
                        revert BridgeAdapterNotWhitelisted();
                    }

                    address inputToken = bridgeData.inputToken.toAddress();
                    if (inputToken == Constants.ETH) {
                        uint256 inputBalance = address(this).balance;
                        if (inputBalance < bridgeData.inputAmount) {
                            revert InsufficientBridgeInputBalance();
                        }

                        // set the output amount in proportion to the actual input amount
                        if (inputBalance != bridgeData.inputAmount) {
                            bridgeData.outputAmount = (bridgeData.outputAmount * inputBalance) / bridgeData.inputAmount;
                        }

                        // set input amount to the balance in contract, this can happen when user swap->bridge
                        // and it can result in more token balance in contract, so bridge as much as possible
                        bridgeData.inputAmount = inputBalance;
                        IBridgeAdapter(bridgeAdapter).bridge{value: bridgeData.inputAmount}(orderId, bridgeData);
                    } else {
                        uint256 inputBalance = ERC20(inputToken).balanceOf(address(this));
                        if (inputBalance < bridgeData.inputAmount) {
                            revert InsufficientBridgeInputBalance();
                        }

                        // set the output amount in proportion to the actual input amount
                        if (inputBalance != bridgeData.inputAmount) {
                            bridgeData.outputAmount = (bridgeData.outputAmount * inputBalance) / bridgeData.inputAmount;
                        }

                        // set input amount to the balance in contract, this can happen when user swap->bridge
                        // and it can result in more token balance in contract, so bridge as much as possible
                        bridgeData.inputAmount = inputBalance;

                        // bridgeAdapter expect token to be transferred over first
                        ERC20(inputToken).safeTransfer(bridgeAdapter, bridgeData.inputAmount);
                        IBridgeAdapter(bridgeAdapter).bridge(orderId, bridgeData);
                    }
                } else if (pcsCommand.command == Commands.SWEEP) {
                    (address token, address recipient, uint256 amountMinimum) =
                        abi.decode(pcsCommand.commandData, (address, address, uint256));
                    Payments.sweep(token, map(recipient), amountMinimum);
                } else {
                    revert CommandNotSupported(pcsCommand.command);
                }
            } else {
                // 0x03 to 0x05
                if (pcsCommand.command == Commands.UNWRAP_WETH) {
                    (address recipient, uint256 amountMinimum) = abi.decode(pcsCommand.commandData, (address, uint256));
                    Payments.unwrapWETH(map(recipient), amountMinimum);
                } else if (pcsCommand.command == Commands.WRAP_ETH) {
                    (address recipient, uint256 amount) = abi.decode(pcsCommand.commandData, (address, uint256));
                    Payments.wrapETH(map(recipient), amount);
                } else if (pcsCommand.command == Commands.TRANSFER) {
                    (address token, address recipient, uint256 amount) =
                        abi.decode(pcsCommand.commandData, (address, address, uint256));
                    Payments.pay(token, map(recipient), amount);
                } else {
                    revert CommandNotSupported(pcsCommand.command);
                }
            }
        }
    }

    /// @notice Checks if a swap target address and function selector are whitelisted.
    /// @param target The target address
    /// @param input The input data to call, will extract the first 4 bytes to get the selector
    /// @return bool Returns true if the target address and function selector are whitelisted, false otherwise.
    function isSwapFunctionWhitelisted(address target, bytes memory input) public view returns (bool) {
        bytes4 selector;
        assembly {
            selector := mload(add(input, 32)) // Load 4 bytes from memory
        }
        return swapFunctionWhitelisted[keccak256(abi.encode(target, selector))];
    }

    /// @notice Checks if a swap target address and function selector are whitelisted.
    /// @param target The target address
    /// @param selector The function selector
    /// @return bool Returns true if the target address and function selector are whitelisted, false otherwise.
    function isSwapFunctionWhitelisted(address target, bytes4 selector) public view returns (bool) {
        return swapFunctionWhitelisted[keccak256(abi.encode(target, selector))];
    }

    /// @notice Sets the whitelist status for a swap target address and function selector.
    function setSwapFunctionWhitelist(address target, bytes4 selector, bool status) external onlyOwner {
        if (target == address(0)) revert AddressZero();

        // blacklist 4 selector: 0x23b872dd: IERC20.transferFrom, 0x095ea7b3: IERC20.approve, 0x39509351 IERC20.increaseAllowance, 0x2da334b5 IBridgeAdapter.bridge
        if (selector == 0x23b872dd || selector == 0x095ea7b3 || selector == 0x39509351 || selector == 0x2da334b5) {
            revert InvalidWhitelistSelector();
        }

        swapFunctionWhitelisted[keccak256(abi.encode(target, selector))] = status;

        emit SetSwapFunctionWhitelist(target, selector, status);
    }

    function setBridgeAdapterWhitelist(address target, bool status) external onlyOwner {
        if (target == address(0)) revert AddressZero();

        isBridgeAdapterWhitelisted[target] = status;

        emit SetBridgeAdapterWhitelist(target, status);
    }

    /// @notice Calculates the recipient address for a command
    /// @param recipient The recipient or recipient-flag for the command
    /// @return output The resultant recipient for the command
    function map(address recipient) internal view returns (address) {
        if (recipient == Constants.MSG_SENDER) {
            return msg.sender;
        } else if (recipient == Constants.ADDRESS_THIS) {
            return address(this);
        } else {
            return recipient;
        }
    }

    /// @dev override this function to add custom validation logic for commands
    function _validateCommands(PCSCommand[] memory pcsCommands) internal virtual {}
}

File 10 of 22 : Constants.sol
/// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

/// @title Constant state
library Constants {
    /// @dev Used as a flag for identifying the transfer of ETH instead of a token
    address internal constant ETH = address(0);

    /// @notice used to signal that the recipient of an action should be the msgSender
    address internal constant MSG_SENDER = address(1);

    /// @notice used to signal that the recipient of an action should be the address(this)
    address internal constant ADDRESS_THIS = address(2);

    /// @notice used to signal that an action should use the contract's entire balance of a currency
    /// This value is equivalent to 1<<255, i.e. a singular 1 in the most significant bit.
    uint256 internal constant CONTRACT_BALANCE = 0x8000000000000000000000000000000000000000000000000000000000000000;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {IEIP712} from "./IEIP712.sol";

/// @title AllowanceTransfer
/// @notice Handles ERC20 token permissions through signature based allowance setting and ERC20 token transfers by checking allowed amounts
/// @dev Requires user's token approval on the Permit2 contract
interface IAllowanceTransfer is IEIP712 {
    /// @notice Thrown when an allowance on a token has expired.
    /// @param deadline The timestamp at which the allowed amount is no longer valid
    error AllowanceExpired(uint256 deadline);

    /// @notice Thrown when an allowance on a token has been depleted.
    /// @param amount The maximum amount allowed
    error InsufficientAllowance(uint256 amount);

    /// @notice Thrown when too many nonces are invalidated.
    error ExcessiveInvalidation();

    /// @notice Emits an event when the owner successfully invalidates an ordered nonce.
    event NonceInvalidation(
        address indexed owner, address indexed token, address indexed spender, uint48 newNonce, uint48 oldNonce
    );

    /// @notice Emits an event when the owner successfully sets permissions on a token for the spender.
    event Approval(
        address indexed owner, address indexed token, address indexed spender, uint160 amount, uint48 expiration
    );

    /// @notice Emits an event when the owner successfully sets permissions using a permit signature on a token for the spender.
    event Permit(
        address indexed owner,
        address indexed token,
        address indexed spender,
        uint160 amount,
        uint48 expiration,
        uint48 nonce
    );

    /// @notice Emits an event when the owner sets the allowance back to 0 with the lockdown function.
    event Lockdown(address indexed owner, address token, address spender);

    /// @notice The permit data for a token
    struct PermitDetails {
        // ERC20 token address
        address token;
        // the maximum amount allowed to spend
        uint160 amount;
        // timestamp at which a spender's token allowances become invalid
        uint48 expiration;
        // an incrementing value indexed per owner,token,and spender for each signature
        uint48 nonce;
    }

    /// @notice The permit message signed for a single token allownce
    struct PermitSingle {
        // the permit data for a single token alownce
        PermitDetails details;
        // address permissioned on the allowed tokens
        address spender;
        // deadline on the permit signature
        uint256 sigDeadline;
    }

    /// @notice The permit message signed for multiple token allowances
    struct PermitBatch {
        // the permit data for multiple token allowances
        PermitDetails[] details;
        // address permissioned on the allowed tokens
        address spender;
        // deadline on the permit signature
        uint256 sigDeadline;
    }

    /// @notice The saved permissions
    /// @dev This info is saved per owner, per token, per spender and all signed over in the permit message
    /// @dev Setting amount to type(uint160).max sets an unlimited approval
    struct PackedAllowance {
        // amount allowed
        uint160 amount;
        // permission expiry
        uint48 expiration;
        // an incrementing value indexed per owner,token,and spender for each signature
        uint48 nonce;
    }

    /// @notice A token spender pair.
    struct TokenSpenderPair {
        // the token the spender is approved
        address token;
        // the spender address
        address spender;
    }

    /// @notice Details for a token transfer.
    struct AllowanceTransferDetails {
        // the owner of the token
        address from;
        // the recipient of the token
        address to;
        // the amount of the token
        uint160 amount;
        // the token to be transferred
        address token;
    }

    /// @notice A mapping from owner address to token address to spender address to PackedAllowance struct, which contains details and conditions of the approval.
    /// @notice The mapping is indexed in the above order see: allowance[ownerAddress][tokenAddress][spenderAddress]
    /// @dev The packed slot holds the allowed amount, expiration at which the allowed amount is no longer valid, and current nonce thats updated on any signature based approvals.
    function allowance(address user, address token, address spender)
        external
        view
        returns (uint160 amount, uint48 expiration, uint48 nonce);

    /// @notice Approves the spender to use up to amount of the specified token up until the expiration
    /// @param token The token to approve
    /// @param spender The spender address to approve
    /// @param amount The approved amount of the token
    /// @param expiration The timestamp at which the approval is no longer valid
    /// @dev The packed allowance also holds a nonce, which will stay unchanged in approve
    /// @dev Setting amount to type(uint160).max sets an unlimited approval
    function approve(address token, address spender, uint160 amount, uint48 expiration) external;

    /// @notice Permit a spender to a given amount of the owners token via the owner's EIP-712 signature
    /// @dev May fail if the owner's nonce was invalidated in-flight by invalidateNonce
    /// @param owner The owner of the tokens being approved
    /// @param permitSingle Data signed over by the owner specifying the terms of approval
    /// @param signature The owner's signature over the permit data
    function permit(address owner, PermitSingle memory permitSingle, bytes calldata signature) external;

    /// @notice Permit a spender to the signed amounts of the owners tokens via the owner's EIP-712 signature
    /// @dev May fail if the owner's nonce was invalidated in-flight by invalidateNonce
    /// @param owner The owner of the tokens being approved
    /// @param permitBatch Data signed over by the owner specifying the terms of approval
    /// @param signature The owner's signature over the permit data
    function permit(address owner, PermitBatch memory permitBatch, bytes calldata signature) external;

    /// @notice Transfer approved tokens from one address to another
    /// @param from The address to transfer from
    /// @param to The address of the recipient
    /// @param amount The amount of the token to transfer
    /// @param token The token address to transfer
    /// @dev Requires the from address to have approved at least the desired amount
    /// of tokens to msg.sender.
    function transferFrom(address from, address to, uint160 amount, address token) external;

    /// @notice Transfer approved tokens in a batch
    /// @param transferDetails Array of owners, recipients, amounts, and tokens for the transfers
    /// @dev Requires the from addresses to have approved at least the desired amount
    /// of tokens to msg.sender.
    function transferFrom(AllowanceTransferDetails[] calldata transferDetails) external;

    /// @notice Enables performing a "lockdown" of the sender's Permit2 identity
    /// by batch revoking approvals
    /// @param approvals Array of approvals to revoke.
    function lockdown(TokenSpenderPair[] calldata approvals) external;

    /// @notice Invalidate nonces for a given (token, spender) pair
    /// @param token The token to invalidate nonces for
    /// @param spender The spender to invalidate nonces for
    /// @param newNonce The new nonce to set. Invalidates all nonces less than it.
    /// @dev Can't invalidate more than 2**16 nonces per transaction.
    function invalidateNonces(address token, address spender, uint48 newNonce) external;
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Safe unsigned integer casting library that reverts on overflow.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeCastLib.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeCast.sol)
library SafeCastLib {
    function safeCastTo248(uint256 x) internal pure returns (uint248 y) {
        require(x < 1 << 248);

        y = uint248(x);
    }

    function safeCastTo240(uint256 x) internal pure returns (uint240 y) {
        require(x < 1 << 240);

        y = uint240(x);
    }

    function safeCastTo232(uint256 x) internal pure returns (uint232 y) {
        require(x < 1 << 232);

        y = uint232(x);
    }

    function safeCastTo224(uint256 x) internal pure returns (uint224 y) {
        require(x < 1 << 224);

        y = uint224(x);
    }

    function safeCastTo216(uint256 x) internal pure returns (uint216 y) {
        require(x < 1 << 216);

        y = uint216(x);
    }

    function safeCastTo208(uint256 x) internal pure returns (uint208 y) {
        require(x < 1 << 208);

        y = uint208(x);
    }

    function safeCastTo200(uint256 x) internal pure returns (uint200 y) {
        require(x < 1 << 200);

        y = uint200(x);
    }

    function safeCastTo192(uint256 x) internal pure returns (uint192 y) {
        require(x < 1 << 192);

        y = uint192(x);
    }

    function safeCastTo184(uint256 x) internal pure returns (uint184 y) {
        require(x < 1 << 184);

        y = uint184(x);
    }

    function safeCastTo176(uint256 x) internal pure returns (uint176 y) {
        require(x < 1 << 176);

        y = uint176(x);
    }

    function safeCastTo168(uint256 x) internal pure returns (uint168 y) {
        require(x < 1 << 168);

        y = uint168(x);
    }

    function safeCastTo160(uint256 x) internal pure returns (uint160 y) {
        require(x < 1 << 160);

        y = uint160(x);
    }

    function safeCastTo152(uint256 x) internal pure returns (uint152 y) {
        require(x < 1 << 152);

        y = uint152(x);
    }

    function safeCastTo144(uint256 x) internal pure returns (uint144 y) {
        require(x < 1 << 144);

        y = uint144(x);
    }

    function safeCastTo136(uint256 x) internal pure returns (uint136 y) {
        require(x < 1 << 136);

        y = uint136(x);
    }

    function safeCastTo128(uint256 x) internal pure returns (uint128 y) {
        require(x < 1 << 128);

        y = uint128(x);
    }

    function safeCastTo120(uint256 x) internal pure returns (uint120 y) {
        require(x < 1 << 120);

        y = uint120(x);
    }

    function safeCastTo112(uint256 x) internal pure returns (uint112 y) {
        require(x < 1 << 112);

        y = uint112(x);
    }

    function safeCastTo104(uint256 x) internal pure returns (uint104 y) {
        require(x < 1 << 104);

        y = uint104(x);
    }

    function safeCastTo96(uint256 x) internal pure returns (uint96 y) {
        require(x < 1 << 96);

        y = uint96(x);
    }

    function safeCastTo88(uint256 x) internal pure returns (uint88 y) {
        require(x < 1 << 88);

        y = uint88(x);
    }

    function safeCastTo80(uint256 x) internal pure returns (uint80 y) {
        require(x < 1 << 80);

        y = uint80(x);
    }

    function safeCastTo72(uint256 x) internal pure returns (uint72 y) {
        require(x < 1 << 72);

        y = uint72(x);
    }

    function safeCastTo64(uint256 x) internal pure returns (uint64 y) {
        require(x < 1 << 64);

        y = uint64(x);
    }

    function safeCastTo56(uint256 x) internal pure returns (uint56 y) {
        require(x < 1 << 56);

        y = uint56(x);
    }

    function safeCastTo48(uint256 x) internal pure returns (uint48 y) {
        require(x < 1 << 48);

        y = uint48(x);
    }

    function safeCastTo40(uint256 x) internal pure returns (uint40 y) {
        require(x < 1 << 40);

        y = uint40(x);
    }

    function safeCastTo32(uint256 x) internal pure returns (uint32 y) {
        require(x < 1 << 32);

        y = uint32(x);
    }

    function safeCastTo24(uint256 x) internal pure returns (uint24 y) {
        require(x < 1 << 24);

        y = uint24(x);
    }

    function safeCastTo16(uint256 x) internal pure returns (uint16 y) {
        require(x < 1 << 16);

        y = uint16(x);
    }

    function safeCastTo8(uint256 x) internal pure returns (uint8 y) {
        require(x < 1 << 8);

        y = uint8(x);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

/// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

struct BridgeData {
    /// @notice the token to be bridged from source chain. Specify address(0) for native token.
    /// @dev bytes32 for supporting non-evm chain in the future
    bytes32 inputToken;
    /// @notice the token to receive on destination chain
    bytes32 outputToken;
    /// @notice the amount of input token to be bridged
    uint256 inputAmount;
    /// @notice the amount of output token to be received
    /// @dev the amount will change base on the actual amount of input token
    /// actualOutputAmount = outputAmount * actualInputAmount / inputAmount
    /// please take reference on the Dispatcher.sol line 100 and 114
    uint256 outputAmount;
    /// @notice if bridge fails (or not executed), refund to this address on source chain
    address refundRecipient;
    /// @notice target bridge adapter to call
    address target;
    /// @notice custom data for each bridge adapter to decode. relayerFeePct for across
    bytes data;
    /// @notice destination chain id
    uint256 destinationChainId;
    /// @notice recipient address on destination chain
    bytes32 recipient;
    /// @notice message to recipient. eg. for across, will be passed as part of message param in handleV3AcrossMessage
    /// @dev for across, it will be abi.encode(PCSCommand[], address fallbackReceiver)
    bytes recipientMessage;
}

/// @title IBridgeAdapter
/// @notice Interface for calling bridge
interface IBridgeAdapter {
    /// @notice Thrown when caller is not xChainSender
    error NotXChainSender();

    /// @notice Thrown when caller is not contract itself
    error NotSelf();

    /// @notice Emitted whenever bridge happen, the event does not have a lot of data as bridge provider will likely emit one too. eg.
    /// for across, it will emit FundDeposit with all the parameters
    event BridgeStarted(
        bytes32 orderId,
        bytes32 inputToken,
        bytes32 outputToken,
        uint256 inputAmt,
        uint256 outputAmt,
        uint256 destinationChainId
    );

    /// @notice Emitted on the destination chain when executing
    event BridgeSuccess(bytes32 orderId);

    /// @notice Emitted on the destination chain when executing commands fails (eg. swap fail)
    event BridgeFallBackExecuted(bytes32 orderId, address token, uint256 tokenAmount, address receiver);

    /// @notice bridge token from source chain to destination chain
    /// @dev payable for the case of native token bridging
    function bridge(bytes32 orderId, BridgeData memory data) external payable;
}

File 15 of 22 : IDispatcher.sol
/// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IDispatcher {
    /// @notice thrown when command not supported
    error CommandNotSupported(uint256 command);

    /// @notice thrown when swap target function is not whitelisted
    error SwapFunctionNotWhitelisted();

    /// @notice thrown when there's insuffcient input token to bridge
    error InsufficientBridgeInputBalance();

    /// @notice thrown when swap command fails
    error FailSwapCall(bytes32 orderId, address target);

    /// @notice thrown when bridge adapter is not whitelisted
    error BridgeAdapterNotWhitelisted();

    /// @notice thrown when address(0) was used when it should not be
    error AddressZero();

    /// @notice thrown when invalid selector was used in setTargetFunctionWhitelist
    error InvalidWhitelistSelector();

    /// @notice emitted whenever swap's function selector whitelisted status is updated
    event SetSwapFunctionWhitelist(address indexed target, bytes4 selector, bool whitelisted);

    /// @notice emitted whenever bridge adapter whitelist status is updated
    event SetBridgeAdapterWhitelist(address indexed adapter, bool whitelisted);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

import {Ownable} from "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This extension of the {Ownable} contract includes a two-step mechanism to transfer
 * ownership, where the new owner must call {acceptOwnership} in order to replace the
 * old one. This can help prevent common mistakes, such as transfers of ownership to
 * incorrect accounts, or to contracts that are unable to interact with the
 * permission system.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     *
     * Setting `newOwner` to the zero address is allowed; this can be used to cancel an initiated ownership transfer.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

File 17 of 22 : ISwapAdapter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

struct SwapData {
    /// @notice inputToken for swap
    address inputToken;
    /// @notice input amount required for swap
    uint256 inputAmount;
    /// @notice If true, will transfer erc20 token to target before swap instead of inputToken.approve(target, inputAmount)
    /// @dev if target is universal router and inputToken is erc20 token, set as true
    bool shouldTransferTokensBeforeSwap;
    /// @notice target address for swap. eg. smart router / universal router
    address target;
    /// @notice input data when calling target
    bytes input;
}

/// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

import {ERC20} from "solmate/src/tokens/ERC20.sol";
import {SafeTransferLib} from "solmate/src/utils/SafeTransferLib.sol";
import {IWETH} from "../interfaces/external/IWETH.sol";
import {Constants} from "./Constants.sol";

/// @title Payments contract
/// @notice Performs various operations around the payment of ETH and tokens
abstract contract Payments {
    using SafeTransferLib for ERC20;
    using SafeTransferLib for address;

    error InsufficientToken();
    error InsufficientETH();

    IWETH public immutable WETH;

    constructor(address _weth) {
        WETH = IWETH(_weth);
    }

    /// @notice Sweeps all of the contract's ERC20 or ETH to an address
    /// @param token The token to sweep (can be ETH using Constants.ETH)
    /// @param recipient The address that will receive payment
    /// @param amountMinimum The minimum desired amount
    function sweep(address token, address recipient, uint256 amountMinimum) internal {
        uint256 balance;
        if (token == Constants.ETH) {
            balance = address(this).balance;
            if (balance < amountMinimum) revert InsufficientETH();
            if (balance > 0) recipient.safeTransferETH(balance);
        } else {
            balance = ERC20(token).balanceOf(address(this));
            if (balance < amountMinimum) revert InsufficientToken();
            if (balance > 0) ERC20(token).safeTransfer(recipient, balance);
        }
    }

    /// @notice Pays an amount of ETH or ERC20 to a recipient
    /// @param token The token to pay (can be ETH using Constants.ETH)
    /// @param recipient The address that will receive the payment
    /// @param value The amount to pay
    function pay(address token, address recipient, uint256 value) internal {
        if (token == Constants.ETH) {
            if (value == Constants.CONTRACT_BALANCE) {
                value = address(this).balance;
            }

            recipient.safeTransferETH(value);
        } else {
            if (value == Constants.CONTRACT_BALANCE) {
                value = ERC20(token).balanceOf(address(this));
            }

            ERC20(token).safeTransfer(recipient, value);
        }
    }

    /// @notice Wraps an amount of ETH into WETH
    /// @param recipient The recipient of the WETH
    /// @param amount The amount to wrap (can be CONTRACT_BALANCE)
    function wrapETH(address recipient, uint256 amount) internal {
        if (amount == Constants.CONTRACT_BALANCE) {
            amount = address(this).balance;
        } else if (amount > address(this).balance) {
            revert InsufficientETH();
        }
        if (amount > 0) {
            WETH.deposit{value: amount}();
            if (recipient != address(this)) {
                ERC20(address(WETH)).safeTransfer(recipient, amount);
            }
        }
    }

    /// @notice Unwraps all of the contract's WETH into ETH
    /// @param recipient The recipient of the ETH
    /// @param amountMinimum The minimum amount of ETH desired
    function unwrapWETH(address recipient, uint256 amountMinimum) internal {
        uint256 value = WETH.balanceOf(address(this));
        if (value < amountMinimum) {
            revert InsufficientETH();
        }
        if (value > 0) {
            WETH.withdraw(value);
            if (recipient != address(this)) {
                recipient.safeTransferETH(value);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

interface IEIP712 {
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title Interface for WETH
interface IWETH is IERC20 {
    /// @notice Deposit ether to get wrapped ether
    function deposit() external payable;

    /// @notice Withdraw wrapped ether to get ether
    function withdraw(uint256) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

Settings
{
  "remappings": [
    "solmate/=lib/solmate/",
    "solady/=lib/solady/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "forge-std/=lib/forge-std/src/",
    "infinity-universal-router/=lib/infinity-universal-router/",
    "infinity-periphery/=lib/infinity-universal-router/lib/infinity-periphery/",
    "infinity-core/=lib/infinity-universal-router/lib/infinity-periphery/lib/infinity-core/",
    "permit2/=lib/infinity-universal-router/lib/infinity-periphery/lib/permit2/",
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-gas-snapshot/=lib/pancake-create3-factory/lib/forge-gas-snapshot/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "pancake-create3-factory/=lib/pancake-create3-factory/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"weth","type":"address"},{"internalType":"address","name":"permit2","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressZero","type":"error"},{"inputs":[],"name":"BridgeAdapterNotWhitelisted","type":"error"},{"inputs":[{"internalType":"uint256","name":"command","type":"uint256"}],"name":"CommandNotSupported","type":"error"},{"inputs":[],"name":"DisallowCombination","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"bytes32","name":"orderId","type":"bytes32"},{"internalType":"address","name":"target","type":"address"}],"name":"FailSwapCall","type":"error"},{"inputs":[],"name":"InsufficientBridgeInputBalance","type":"error"},{"inputs":[],"name":"InsufficientETH","type":"error"},{"inputs":[],"name":"InsufficientSendBalance","type":"error"},{"inputs":[],"name":"InsufficientToken","type":"error"},{"inputs":[],"name":"InvalidBytes32Address","type":"error"},{"inputs":[],"name":"InvalidWhitelistSelector","type":"error"},{"inputs":[],"name":"MoreThanOneBridgeCommand","type":"error"},{"inputs":[],"name":"NoSwapAfterBridgeCommand","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"SwapFunctionNotWhitelisted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"orderId","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"order","type":"bytes"}],"name":"Send","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"adapter","type":"address"},{"indexed":false,"internalType":"bool","name":"whitelisted","type":"bool"}],"name":"SetBridgeAdapterWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"bool","name":"whitelisted","type":"bool"}],"name":"SetSwapFunctionWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"PERMIT2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getNextOrderId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBridgeAdapterWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"input","type":"bytes"}],"name":"isSwapFunctionWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"isSwapFunctionWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfOrders","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"inputToken","type":"bytes32"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"components":[{"internalType":"uint256","name":"command","type":"uint256"},{"internalType":"bytes","name":"commandData","type":"bytes"}],"internalType":"struct PCSCommand[]","name":"commands","type":"tuple[]"},{"internalType":"bytes","name":"permit2Data","type":"bytes"}],"internalType":"struct PCSOrderData","name":"order","type":"tuple"}],"name":"send","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setBridgeAdapterWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setSwapFunctionWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c03461012957601f61307438819003918201601f19168301916001600160401b0383118484101761012e578084926060946040528339810103126101295761004781610144565b61005f604061005860208501610144565b9301610144565b6001600160a01b0390911691821561011357600180546001600160a01b0319908116909155600080549182168517815560405194916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a01b031660805260016004556005805460ff1916905560a052612f1b908161015982396080518181816110e0015281816129d10152612aed015260a05181818161069b01526109eb0152f35b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101295756fe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806305df27a11461013b578063080ca2431461013657806327ad57d5146101315780633f4ba83a1461012c5780635c975abb146101275780636afdd85014610122578063715018a61461011d57806379ba50971461011857806379e41c7a146101135780637a54d7751461010e5780638158900b146101095780638456cb59146101045780638da5cb5b146100ff578063aaaeaf5e146100fa578063ad5c4648146100f5578063b451794e146100f0578063e30c3978146100eb5763f2fde38b0361000e57611192565b611140565b611104565b611095565b610fd6565b610f84565b610ee6565b610ea5565b610dc8565b610d57565b610ad3565b610a0f565b6109a0565b61095f565b6108c4565b6104e9565b610217565b610170565b73ffffffffffffffffffffffffffffffffffffffff81160361015e57565b600080fd5b359061016e82610140565b565b3461015e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5773ffffffffffffffffffffffffffffffffffffffff6004356101c081610140565b166000526003602052602060ff604060002054166040519015158152f35b602435907fffffffff000000000000000000000000000000000000000000000000000000008216820361015e57565b8015150361015e57565b3461015e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5760043561025281610140565b61025a6101de565b906044356102678161020d565b61026f6118f5565b73ffffffffffffffffffffffffffffffffffffffff82169283156104bf577fffffffff0000000000000000000000000000000000000000000000000000000081167f23b872dd000000000000000000000000000000000000000000000000000000008114908115610495575b811561046b575b8115610441575b50610417576103e1826103b17fff1a2ed9c559be7343626a32f36160299954e9f425c6ebe3655d8f27be900f899560405161039e81610372886020830195869092917fffffffff0000000000000000000000000000000000000000000000000000000060209173ffffffffffffffffffffffffffffffffffffffff604085019616845216910152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610c85565b5190206000526002602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b604080517fffffffff000000000000000000000000000000000000000000000000000000009290921682529115156020820152a2005b7f8efeb66e0000000000000000000000000000000000000000000000000000000060005260046000fd5b7f2da334b500000000000000000000000000000000000000000000000000000000915014386102e9565b7f3950935100000000000000000000000000000000000000000000000000000000811491506102e2565b7f095ea7b300000000000000000000000000000000000000000000000000000000811491506102db565b7f9fabe1c10000000000000000000000000000000000000000000000000000000060005260046000fd5b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5760043567ffffffffffffffff811161015e578060040160807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261015e5760016004540361085b57600260045561056c611916565b803573ffffffffffffffffffffffffffffffffffffffff61058c8261194c565b1661065657506024820135340361062c5761060c6103726106007fafbe1df72b07bfe5bfeaf8d0502bbeb554fd24f80e2f6dfaef57f9c81ca4a271935b6105f16105eb6105e460446105dc6118c7565b9901846114f3565b3691611547565b87611e44565b6040519283916020830161173e565b60405191829182611800565b0390a261062261061d600654611840565b600655565b6100196001600455565b7f1b34520b0000000000000000000000000000000000000000000000000000000060005260046000fd5b90606483016106658183611255565b1590506107f35761069661068e73ffffffffffffffffffffffffffffffffffffffff9284611255565b8101906112b9565b6000807f0000000000000000000000000000000000000000000000000000000000000000926103726107006020835193015160405192839160208301957f2b67b5700000000000000000000000000000000000000000000000000000000087523360248501611404565b519082855af15061070f6114b7565b5016916107286107226024860135611a7b565b9161194c565b833b1561015e576040517f36c7851600000000000000000000000000000000000000000000000000000000815233600482015230602482015273ffffffffffffffffffffffffffffffffffffffff928316604482015291166064820152916000908390608490829084905af19182156107ee5761060061060c92610372927fafbe1df72b07bfe5bfeaf8d0502bbeb554fd24f80e2f6dfaef57f9c81ca4a271956107d3575b506105c9565b806107e260006107e893610c85565b806108b9565b386107cd565b6114e7565b5061037261060061060c9261085661084761082e7fafbe1df72b07bfe5bfeaf8d0502bbeb554fd24f80e2f6dfaef57f9c81ca4a2719761194c565b73ffffffffffffffffffffffffffffffffffffffff1690565b60248801359030903390611997565b6105c9565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f5245454e5452414e4359000000000000000000000000000000000000000000006044820152fd5b600091031261015e57565b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e576108fb6118f5565b61090361274f565b61090b61274f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600554166005557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602060ff600554166040519015158152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57610a466118f5565b7fffffffffffffffffffffffff000000000000000000000000000000000000000060015416600155600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e573373ffffffffffffffffffffffffffffffffffffffff6001541603610bb3577fffffffffffffffffffffffff000000000000000000000000000000000000000060015416600155600054337fffffffffffffffffffffffff000000000000000000000000000000000000000082161760005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f118cdaa7000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610c2c57604052565b610be1565b6060810190811067ffffffffffffffff821117610c2c57604052565b6080810190811067ffffffffffffffff821117610c2c57604052565b60a0810190811067ffffffffffffffff821117610c2c57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610c2c57604052565b6040519061016e61014083610c85565b67ffffffffffffffff8111610c2c57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f8201121561015e57803590610d2782610cd6565b92610d356040519485610c85565b8284526020838301011161015e57816000926020809301838601378301015290565b3461015e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57600435610d9281610140565b60243567ffffffffffffffff811161015e57602091610db8610dbe923690600401610d10565b90611853565b6040519015158152f35b3461015e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57600435610e0381610140565b73ffffffffffffffffffffffffffffffffffffffff60243591610e258361020d565b610e2d6118f5565b169081156104bf5760207faa1e61e4b2bdff2663672064c648aa1fd5e95092f24b94e83c374a3a47e6ffae918360005260038252610e9a8160406000209060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b6040519015158152a2005b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e576020610ede6118c7565b604051908152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57610f1d6118f5565b610f25611916565b610f2d611916565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0060055416176005557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b3461015e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5760043561101181610140565b61037261107561101f6101de565b6040519283916020830195869092917fffffffff0000000000000000000000000000000000000000000000000000000060209173ffffffffffffffffffffffffffffffffffffffff604085019616845216910152565b5190206000526002602052602060ff604060002054166040519015158152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e576020600654604051908152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461015e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5773ffffffffffffffffffffffffffffffffffffffff6004356111e281610140565b6111ea6118f5565b16807fffffffffffffffffffffffff0000000000000000000000000000000000000000600154161760015573ffffffffffffffffffffffffffffffffffffffff600054167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700600080a3005b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561015e570180359067ffffffffffffffff821161015e5760200191813603831361015e57565b359065ffffffffffff8216820361015e57565b60208183031261015e5780359067ffffffffffffffff821161015e57018082039160e0831261015e57604051926112ef84610c10565b60c0811261015e5760806040519161130683610c31565b1261015e5760405161131781610c4d565b833561132281610140565b8152602084013561133281610140565b6020820152611343604085016112a6565b6040820152611354606085016112a6565b6060820152815261136760808401610163565b602082015260a08301356040820152835260c082013567ffffffffffffffff811161015e576113969201610d10565b602082015290565b60005b8381106113b15750506000910152565b81810151838201526020016113a1565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936113fd8151809281875287808801910161139e565b0116010190565b60406114b4949373ffffffffffffffffffffffffffffffffffffffff6101009416835265ffffffffffff6060825173ffffffffffffffffffffffffffffffffffffffff815116602087015273ffffffffffffffffffffffffffffffffffffffff6020820151168587015282858201511682870152015116608084015273ffffffffffffffffffffffffffffffffffffffff60208201511660a0840152015160c08201528160e082015201906113c1565b90565b3d156114e2573d906114c882610cd6565b916114d66040519384610c85565b82523d6000602084013e565b606090565b6040513d6000823e3d90fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561015e570180359067ffffffffffffffff821161015e57602001918160051b3603831361015e57565b9291909267ffffffffffffffff8411610c2c578360051b602060405161156f82840182610c85565b80968152019082019183831161015e5780915b838310611590575050505050565b823567ffffffffffffffff811161015e57820160408187031261015e57604051916115ba83610c10565b8135835260208201359267ffffffffffffffff841161015e576115e288602095869501610d10565b83820152815201920191611582565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561015e57016020813591019167ffffffffffffffff821161015e57813603831361015e57565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b90602083828152019060208160051b85010193836000915b8383106116a85750505050505090565b9091929394957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301865286357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18436030181121561015e57602061173060019360406117218885960180358452858101906115f1565b91909281868201520191611641565b980196019493019190611698565b9060208252803560208301526020810135604083015260408101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561015e5781019160208335930167ffffffffffffffff841161015e578360051b3603811361015e576117c56117d0916114b4956080606086015260a0850191611680565b9260608101906115f1565b9160807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082860301910152611641565b9060206114b49281815201906113c1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b906001820180921161184e57565b611811565b6020918201516040805173ffffffffffffffffffffffffffffffffffffffff9093169383019384527fffffffff00000000000000000000000000000000000000000000000000000000909116908201526118b08160608101610372565b519020600052600260205260ff6040600020541690565b60065460405160208101913083526040820152466060820152606081526118ef608082610c85565b51902090565b73ffffffffffffffffffffffffffffffffffffffff600054163303610bb357565b60ff6005541661192257565b7fd93c06650000000000000000000000000000000000000000000000000000000060005260046000fd5b8060a01c61196d5773ffffffffffffffffffffffffffffffffffffffff1690565b7ff7d2b34a0000000000000000000000000000000000000000000000000000000060005260046000fd5b926020929160649173ffffffffffffffffffffffffffffffffffffffff60009481604051947f23b872dd000000000000000000000000000000000000000000000000000000008652166004850152166024830152604482015282855af19081601f3d11600160005114161516611a6e575b5015611a1057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152fd5b3b153d1715905038611a08565b7401000000000000000000000000000000000000000081101561015e5773ffffffffffffffffffffffffffffffffffffffff1690565b60ff1660ff811461184e5760010190565b8051821015611ad65760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9081606091031261015e578051611b1b81610140565b9160406020830151611b2c81610140565b92015190565b919082604091031261015e5760208251611b2c81610140565b519061016e82610140565b81601f8201121561015e578051611b6c81610cd6565b92611b7a6040519485610c85565b8184526020828401011161015e576114b4916020808501910161139e565b60208183031261015e5780519067ffffffffffffffff821161015e57016101408183031261015e57611bc8610cc6565b9181518352602082015160208401526040820151604084015260608201516060840152611bf760808301611b4b565b6080840152611c0860a08301611b4b565b60a084015260c082015167ffffffffffffffff811161015e5781611c2d918401611b56565b60c084015260e082015160e084015261010082015161010084015261012082015167ffffffffffffffff811161015e57611c679201611b56565b61012082015290565b9081602091031261015e575190565b8181029291811591840414171561184e57565b8115611c9c570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6114b49291815260406020820152815160408201526020820151606082015260408201516080820152606082015160a0820152611d25608083015160c083019073ffffffffffffffffffffffffffffffffffffffff169052565b60a082015173ffffffffffffffffffffffffffffffffffffffff1660e0820152610120611d6460c08401516101406101008501526101808401906113c1565b9260e0810151828401526101008101516101408401520151906101607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0828503019101526113c1565b60208183031261015e5780519067ffffffffffffffff821161015e570160a08183031261015e5760405191611de183610c69565b8151611dec81610140565b8352602082015160208401526040820151611e068161020d565b60408401526060820151611e1981610140565b6060840152608082015167ffffffffffffffff811161015e57611e3c9201611b56565b608082015290565b9091611e4f83612786565b60005b835160ff82169081101561274857611e6a9085611ac2565b5180516003811015612672575080518061233757506020611e9691015160208082518301019101611dad565b6060810190611eb9825173ffffffffffffffffffffffffffffffffffffffff1690565b611ed0611ecc6080840192835190611853565b1590565b61230d57602082015191611ef8815173ffffffffffffffffffffffffffffffffffffffff1690565b9173ffffffffffffffffffffffffffffffffffffffff83169182156122a2577f80000000000000000000000000000000000000000000000000000000000000008514808061228c575b612262576121e1575b600080611fc6936040611ecc940197611f638951151590565b83146121b457611f9190611f8b8b5173ffffffffffffffffffffffffffffffffffffffff1690565b88612cc1565b885173ffffffffffffffffffffffffffffffffffffffff1690519082602083519301915af1611fbe6114b7565b509451151590565b90816120ec575b50612058575b505b15611fea5750611fe5905b611ab1565b611e52565b8361200c612054925173ffffffffffffffffffffffffffffffffffffffff1690565b7fd3e223fa0000000000000000000000000000000000000000000000000000000060005260049190915273ffffffffffffffffffffffffffffffffffffffff16602452604490565b6000fd5b6000809161207a855173ffffffffffffffffffffffffffffffffffffffff1690565b6040517f095ea7b3000000000000000000000000000000000000000000000000000000006020820190815273ffffffffffffffffffffffffffffffffffffffff90921660248201526000604482015283906120d88160648101610372565b51925af1506120e56114b7565b5038611fd3565b61216a9150602090612112865173ffffffffffffffffffffffffffffffffffffffff1690565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116602482015292839190829081906044820190565b03915afa9081156107ee57600091612186575b50151538611fcd565b6121a7915060203d81116121ad575b61219f8183610c85565b810190611c70565b3861217d565b503d612195565b6121dc906121d68b5173ffffffffffffffffffffffffffffffffffffffff1690565b88612d9c565b611f91565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290945090602082602481865afa9182156107ee576000611ecc926040611fc69583948491612244575b509894505093505050611f4a565b61225c915060203d81116121ad5761219f8183610c85565b38612236565b7f48c129340000000000000000000000000000000000000000000000000000000060005260046000fd5b5061229d611ecc6040840151151590565b611f41565b5060009391508392507f80000000000000000000000000000000000000000000000000000000000000008214612305575b845173ffffffffffffffffffffffffffffffffffffffff16905191602083519301915af16122ff6114b7565b50611fd5565b4791506122d3565b7f4cc294190000000000000000000000000000000000000000000000000000000060005260046000fd5b600181036125f55750602061235791015160208082518301019101611b98565b9061237960a083015173ffffffffffffffffffffffffffffffffffffffff1690565b916123b1611ecc6123aa8573ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b5460ff1690565b6125cb5773ffffffffffffffffffffffffffffffffffffffff6123d4825161194c565b16806124cb575047926040820190815185106124a157848273ffffffffffffffffffffffffffffffffffffffff93518203612480575b521690813b1561015e57600091612451916040519586809481937f2da334b50000000000000000000000000000000000000000000000000000000083528b60048401611ccb565b03925af19182156107ee57611fe59261246b575b50611ab1565b806107e2600061247a93610c85565b38612465565b6060850161249a612492848351611c7f565b835190611c92565b905261240a565b7f21f55fa80000000000000000000000000000000000000000000000000000000060005260046000fd5b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152919390602083602481845afa9283156107ee576000936125ab575b506040850192835181106124a1578261254b92828673ffffffffffffffffffffffffffffffffffffffff97518203612592575b52612cc1565b16803b1561015e576124516000939184926040519586809481937f2da334b50000000000000000000000000000000000000000000000000000000083528b60048401611ccb565b60608a016125a4612492848351611c7f565b9052612545565b6125c491935060203d81116121ad5761219f8183610c85565b9138612512565b7f40c01d000000000000000000000000000000000000000000000000000000000060005260046000fd5b60028103612645575090611fe061263e73ffffffffffffffffffffffffffffffffffffffff806126356020611fe597015160208082518301019101611b05565b9491931661285d565b9116612bed565b7fa00a107f0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b600581036126bd575090611fe073ffffffffffffffffffffffffffffffffffffffff6126b86126b16020611fe596015160208082518301019101611b32565b921661285d565b612aa8565b60048103612701575090611fe073ffffffffffffffffffffffffffffffffffffffff6126fc6126b16020611fe596015160208082518301019101611b32565b612986565b60038103612645575090611fe061274173ffffffffffffffffffffffffffffffffffffffff806126356020611fe597015160208082518301019101611b05565b911661288e565b5050915050565b60ff600554161561275c57565b7f8dfc202b0000000000000000000000000000000000000000000000000000000060005260046000fd5b60009060005b81518110156128585761279f8183611ac2565b515160018114612827575b600184116127fd576001841490816127f4575b506127ca5760010161278c565b7fa8245c830000000000000000000000000000000000000000000000000000000060005260046000fd5b905015386127bd565b7f73bbfa810000000000000000000000000000000000000000000000000000000060005260046000fd5b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461184e57600101926127aa565b505050565b73ffffffffffffffffffffffffffffffffffffffff8116600181036128825750503390565b6002036114b457503090565b90919073ffffffffffffffffffffffffffffffffffffffff16806128e0575061016e917f80000000000000000000000000000000000000000000000000000000000000008203612e7757479150612e77565b7f80000000000000000000000000000000000000000000000000000000000000008214612912575b9161016e92612cc1565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015292909150602083602481855afa80156107ee5761016e93600091612967575b5091909250612908565b612980915060203d6020116121ad5761219f8183610c85565b3861295d565b907f80000000000000000000000000000000000000000000000000000000000000008103612a755750475b806129ba575050565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691823b1561015e576040517fd0e30db000000000000000000000000000000000000000000000000000000000815260008160048186885af180156107ee57612a60575b503073ffffffffffffffffffffffffffffffffffffffff821603612a5757505050565b61016e92612cc1565b806107e26000612a6f93610c85565b38612a34565b478111156129b1575b7f6a12f1040000000000000000000000000000000000000000000000000000000060005260046000fd5b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152909173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690602083602481855afa9283156107ee57600093612bcc575b508210612a7e5781612b3757505050565b803b1561015e57600060405180927f2e1a7d4d000000000000000000000000000000000000000000000000000000008252818381612b7d88600483019190602083019252565b03925af180156107ee57612bb7575b503073ffffffffffffffffffffffffffffffffffffffff831603612bae575050565b61016e91612e77565b806107e26000612bc693610c85565b38612b8c565b612be691935060203d6020116121ad5761219f8183610c85565b9138612b26565b90919073ffffffffffffffffffffffffffffffffffffffff1680612c1d575047908110612a7e5780612bae575050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290929091602083602481875afa9283156107ee57600093612ca0575b508210612c765781612a5757505050565b7f675cae380000000000000000000000000000000000000000000000000000000060005260046000fd5b612cba91935060203d6020116121ad5761219f8183610c85565b9138612c65565b91604460209260009273ffffffffffffffffffffffffffffffffffffffff604051927fa9059cbb000000000000000000000000000000000000000000000000000000008452166004830152602482015282855af19081601f3d11600160005114161516612d8f575b5015612d3157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b3b153d1715905038612d29565b91604460209260009273ffffffffffffffffffffffffffffffffffffffff604051927f095ea7b3000000000000000000000000000000000000000000000000000000008452166004830152602482015282855af19081601f3d11600160005114161516612e6a575b5015612e0c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f415050524f56455f4641494c45440000000000000000000000000000000000006044820152fd5b3b153d1715905038612e04565b600080809381935af115612e8757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152fdfea2646970667358221220c792c7b37f5fb9db7b5aef72f9c83429397e1afb7adaa1b9d264a89ab9e6154164736f6c634300081a0033000000000000000000000000702099e284f23da733c03b461c7571a742782fc2000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00000000000000000000000031c2f6fcff4f8759b3bd5bf0e1084a055615c768

Deployed Bytecode

0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806305df27a11461013b578063080ca2431461013657806327ad57d5146101315780633f4ba83a1461012c5780635c975abb146101275780636afdd85014610122578063715018a61461011d57806379ba50971461011857806379e41c7a146101135780637a54d7751461010e5780638158900b146101095780638456cb59146101045780638da5cb5b146100ff578063aaaeaf5e146100fa578063ad5c4648146100f5578063b451794e146100f0578063e30c3978146100eb5763f2fde38b0361000e57611192565b611140565b611104565b611095565b610fd6565b610f84565b610ee6565b610ea5565b610dc8565b610d57565b610ad3565b610a0f565b6109a0565b61095f565b6108c4565b6104e9565b610217565b610170565b73ffffffffffffffffffffffffffffffffffffffff81160361015e57565b600080fd5b359061016e82610140565b565b3461015e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5773ffffffffffffffffffffffffffffffffffffffff6004356101c081610140565b166000526003602052602060ff604060002054166040519015158152f35b602435907fffffffff000000000000000000000000000000000000000000000000000000008216820361015e57565b8015150361015e57565b3461015e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5760043561025281610140565b61025a6101de565b906044356102678161020d565b61026f6118f5565b73ffffffffffffffffffffffffffffffffffffffff82169283156104bf577fffffffff0000000000000000000000000000000000000000000000000000000081167f23b872dd000000000000000000000000000000000000000000000000000000008114908115610495575b811561046b575b8115610441575b50610417576103e1826103b17fff1a2ed9c559be7343626a32f36160299954e9f425c6ebe3655d8f27be900f899560405161039e81610372886020830195869092917fffffffff0000000000000000000000000000000000000000000000000000000060209173ffffffffffffffffffffffffffffffffffffffff604085019616845216910152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610c85565b5190206000526002602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b604080517fffffffff000000000000000000000000000000000000000000000000000000009290921682529115156020820152a2005b7f8efeb66e0000000000000000000000000000000000000000000000000000000060005260046000fd5b7f2da334b500000000000000000000000000000000000000000000000000000000915014386102e9565b7f3950935100000000000000000000000000000000000000000000000000000000811491506102e2565b7f095ea7b300000000000000000000000000000000000000000000000000000000811491506102db565b7f9fabe1c10000000000000000000000000000000000000000000000000000000060005260046000fd5b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5760043567ffffffffffffffff811161015e578060040160807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261015e5760016004540361085b57600260045561056c611916565b803573ffffffffffffffffffffffffffffffffffffffff61058c8261194c565b1661065657506024820135340361062c5761060c6103726106007fafbe1df72b07bfe5bfeaf8d0502bbeb554fd24f80e2f6dfaef57f9c81ca4a271935b6105f16105eb6105e460446105dc6118c7565b9901846114f3565b3691611547565b87611e44565b6040519283916020830161173e565b60405191829182611800565b0390a261062261061d600654611840565b600655565b6100196001600455565b7f1b34520b0000000000000000000000000000000000000000000000000000000060005260046000fd5b90606483016106658183611255565b1590506107f35761069661068e73ffffffffffffffffffffffffffffffffffffffff9284611255565b8101906112b9565b6000807f00000000000000000000000031c2f6fcff4f8759b3bd5bf0e1084a055615c768926103726107006020835193015160405192839160208301957f2b67b5700000000000000000000000000000000000000000000000000000000087523360248501611404565b519082855af15061070f6114b7565b5016916107286107226024860135611a7b565b9161194c565b833b1561015e576040517f36c7851600000000000000000000000000000000000000000000000000000000815233600482015230602482015273ffffffffffffffffffffffffffffffffffffffff928316604482015291166064820152916000908390608490829084905af19182156107ee5761060061060c92610372927fafbe1df72b07bfe5bfeaf8d0502bbeb554fd24f80e2f6dfaef57f9c81ca4a271956107d3575b506105c9565b806107e260006107e893610c85565b806108b9565b386107cd565b6114e7565b5061037261060061060c9261085661084761082e7fafbe1df72b07bfe5bfeaf8d0502bbeb554fd24f80e2f6dfaef57f9c81ca4a2719761194c565b73ffffffffffffffffffffffffffffffffffffffff1690565b60248801359030903390611997565b6105c9565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f5245454e5452414e4359000000000000000000000000000000000000000000006044820152fd5b600091031261015e57565b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e576108fb6118f5565b61090361274f565b61090b61274f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600554166005557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602060ff600554166040519015158152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000031c2f6fcff4f8759b3bd5bf0e1084a055615c768168152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57610a466118f5565b7fffffffffffffffffffffffff000000000000000000000000000000000000000060015416600155600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e573373ffffffffffffffffffffffffffffffffffffffff6001541603610bb3577fffffffffffffffffffffffff000000000000000000000000000000000000000060015416600155600054337fffffffffffffffffffffffff000000000000000000000000000000000000000082161760005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f118cdaa7000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610c2c57604052565b610be1565b6060810190811067ffffffffffffffff821117610c2c57604052565b6080810190811067ffffffffffffffff821117610c2c57604052565b60a0810190811067ffffffffffffffff821117610c2c57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610c2c57604052565b6040519061016e61014083610c85565b67ffffffffffffffff8111610c2c57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f8201121561015e57803590610d2782610cd6565b92610d356040519485610c85565b8284526020838301011161015e57816000926020809301838601378301015290565b3461015e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57600435610d9281610140565b60243567ffffffffffffffff811161015e57602091610db8610dbe923690600401610d10565b90611853565b6040519015158152f35b3461015e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57600435610e0381610140565b73ffffffffffffffffffffffffffffffffffffffff60243591610e258361020d565b610e2d6118f5565b169081156104bf5760207faa1e61e4b2bdff2663672064c648aa1fd5e95092f24b94e83c374a3a47e6ffae918360005260038252610e9a8160406000209060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b6040519015158152a2005b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e576020610ede6118c7565b604051908152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57610f1d6118f5565b610f25611916565b610f2d611916565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0060055416176005557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b3461015e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5760043561101181610140565b61037261107561101f6101de565b6040519283916020830195869092917fffffffff0000000000000000000000000000000000000000000000000000000060209173ffffffffffffffffffffffffffffffffffffffff604085019616845216910152565b5190206000526002602052602060ff604060002054166040519015158152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f168152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e576020600654604051908152f35b3461015e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461015e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015e5773ffffffffffffffffffffffffffffffffffffffff6004356111e281610140565b6111ea6118f5565b16807fffffffffffffffffffffffff0000000000000000000000000000000000000000600154161760015573ffffffffffffffffffffffffffffffffffffffff600054167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700600080a3005b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561015e570180359067ffffffffffffffff821161015e5760200191813603831361015e57565b359065ffffffffffff8216820361015e57565b60208183031261015e5780359067ffffffffffffffff821161015e57018082039160e0831261015e57604051926112ef84610c10565b60c0811261015e5760806040519161130683610c31565b1261015e5760405161131781610c4d565b833561132281610140565b8152602084013561133281610140565b6020820152611343604085016112a6565b6040820152611354606085016112a6565b6060820152815261136760808401610163565b602082015260a08301356040820152835260c082013567ffffffffffffffff811161015e576113969201610d10565b602082015290565b60005b8381106113b15750506000910152565b81810151838201526020016113a1565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936113fd8151809281875287808801910161139e565b0116010190565b60406114b4949373ffffffffffffffffffffffffffffffffffffffff6101009416835265ffffffffffff6060825173ffffffffffffffffffffffffffffffffffffffff815116602087015273ffffffffffffffffffffffffffffffffffffffff6020820151168587015282858201511682870152015116608084015273ffffffffffffffffffffffffffffffffffffffff60208201511660a0840152015160c08201528160e082015201906113c1565b90565b3d156114e2573d906114c882610cd6565b916114d66040519384610c85565b82523d6000602084013e565b606090565b6040513d6000823e3d90fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561015e570180359067ffffffffffffffff821161015e57602001918160051b3603831361015e57565b9291909267ffffffffffffffff8411610c2c578360051b602060405161156f82840182610c85565b80968152019082019183831161015e5780915b838310611590575050505050565b823567ffffffffffffffff811161015e57820160408187031261015e57604051916115ba83610c10565b8135835260208201359267ffffffffffffffff841161015e576115e288602095869501610d10565b83820152815201920191611582565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561015e57016020813591019167ffffffffffffffff821161015e57813603831361015e57565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b90602083828152019060208160051b85010193836000915b8383106116a85750505050505090565b9091929394957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301865286357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18436030181121561015e57602061173060019360406117218885960180358452858101906115f1565b91909281868201520191611641565b980196019493019190611698565b9060208252803560208301526020810135604083015260408101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561015e5781019160208335930167ffffffffffffffff841161015e578360051b3603811361015e576117c56117d0916114b4956080606086015260a0850191611680565b9260608101906115f1565b9160807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082860301910152611641565b9060206114b49281815201906113c1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b906001820180921161184e57565b611811565b6020918201516040805173ffffffffffffffffffffffffffffffffffffffff9093169383019384527fffffffff00000000000000000000000000000000000000000000000000000000909116908201526118b08160608101610372565b519020600052600260205260ff6040600020541690565b60065460405160208101913083526040820152466060820152606081526118ef608082610c85565b51902090565b73ffffffffffffffffffffffffffffffffffffffff600054163303610bb357565b60ff6005541661192257565b7fd93c06650000000000000000000000000000000000000000000000000000000060005260046000fd5b8060a01c61196d5773ffffffffffffffffffffffffffffffffffffffff1690565b7ff7d2b34a0000000000000000000000000000000000000000000000000000000060005260046000fd5b926020929160649173ffffffffffffffffffffffffffffffffffffffff60009481604051947f23b872dd000000000000000000000000000000000000000000000000000000008652166004850152166024830152604482015282855af19081601f3d11600160005114161516611a6e575b5015611a1057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152fd5b3b153d1715905038611a08565b7401000000000000000000000000000000000000000081101561015e5773ffffffffffffffffffffffffffffffffffffffff1690565b60ff1660ff811461184e5760010190565b8051821015611ad65760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9081606091031261015e578051611b1b81610140565b9160406020830151611b2c81610140565b92015190565b919082604091031261015e5760208251611b2c81610140565b519061016e82610140565b81601f8201121561015e578051611b6c81610cd6565b92611b7a6040519485610c85565b8184526020828401011161015e576114b4916020808501910161139e565b60208183031261015e5780519067ffffffffffffffff821161015e57016101408183031261015e57611bc8610cc6565b9181518352602082015160208401526040820151604084015260608201516060840152611bf760808301611b4b565b6080840152611c0860a08301611b4b565b60a084015260c082015167ffffffffffffffff811161015e5781611c2d918401611b56565b60c084015260e082015160e084015261010082015161010084015261012082015167ffffffffffffffff811161015e57611c679201611b56565b61012082015290565b9081602091031261015e575190565b8181029291811591840414171561184e57565b8115611c9c570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6114b49291815260406020820152815160408201526020820151606082015260408201516080820152606082015160a0820152611d25608083015160c083019073ffffffffffffffffffffffffffffffffffffffff169052565b60a082015173ffffffffffffffffffffffffffffffffffffffff1660e0820152610120611d6460c08401516101406101008501526101808401906113c1565b9260e0810151828401526101008101516101408401520151906101607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0828503019101526113c1565b60208183031261015e5780519067ffffffffffffffff821161015e570160a08183031261015e5760405191611de183610c69565b8151611dec81610140565b8352602082015160208401526040820151611e068161020d565b60408401526060820151611e1981610140565b6060840152608082015167ffffffffffffffff811161015e57611e3c9201611b56565b608082015290565b9091611e4f83612786565b60005b835160ff82169081101561274857611e6a9085611ac2565b5180516003811015612672575080518061233757506020611e9691015160208082518301019101611dad565b6060810190611eb9825173ffffffffffffffffffffffffffffffffffffffff1690565b611ed0611ecc6080840192835190611853565b1590565b61230d57602082015191611ef8815173ffffffffffffffffffffffffffffffffffffffff1690565b9173ffffffffffffffffffffffffffffffffffffffff83169182156122a2577f80000000000000000000000000000000000000000000000000000000000000008514808061228c575b612262576121e1575b600080611fc6936040611ecc940197611f638951151590565b83146121b457611f9190611f8b8b5173ffffffffffffffffffffffffffffffffffffffff1690565b88612cc1565b885173ffffffffffffffffffffffffffffffffffffffff1690519082602083519301915af1611fbe6114b7565b509451151590565b90816120ec575b50612058575b505b15611fea5750611fe5905b611ab1565b611e52565b8361200c612054925173ffffffffffffffffffffffffffffffffffffffff1690565b7fd3e223fa0000000000000000000000000000000000000000000000000000000060005260049190915273ffffffffffffffffffffffffffffffffffffffff16602452604490565b6000fd5b6000809161207a855173ffffffffffffffffffffffffffffffffffffffff1690565b6040517f095ea7b3000000000000000000000000000000000000000000000000000000006020820190815273ffffffffffffffffffffffffffffffffffffffff90921660248201526000604482015283906120d88160648101610372565b51925af1506120e56114b7565b5038611fd3565b61216a9150602090612112865173ffffffffffffffffffffffffffffffffffffffff1690565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116602482015292839190829081906044820190565b03915afa9081156107ee57600091612186575b50151538611fcd565b6121a7915060203d81116121ad575b61219f8183610c85565b810190611c70565b3861217d565b503d612195565b6121dc906121d68b5173ffffffffffffffffffffffffffffffffffffffff1690565b88612d9c565b611f91565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290945090602082602481865afa9182156107ee576000611ecc926040611fc69583948491612244575b509894505093505050611f4a565b61225c915060203d81116121ad5761219f8183610c85565b38612236565b7f48c129340000000000000000000000000000000000000000000000000000000060005260046000fd5b5061229d611ecc6040840151151590565b611f41565b5060009391508392507f80000000000000000000000000000000000000000000000000000000000000008214612305575b845173ffffffffffffffffffffffffffffffffffffffff16905191602083519301915af16122ff6114b7565b50611fd5565b4791506122d3565b7f4cc294190000000000000000000000000000000000000000000000000000000060005260046000fd5b600181036125f55750602061235791015160208082518301019101611b98565b9061237960a083015173ffffffffffffffffffffffffffffffffffffffff1690565b916123b1611ecc6123aa8573ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b5460ff1690565b6125cb5773ffffffffffffffffffffffffffffffffffffffff6123d4825161194c565b16806124cb575047926040820190815185106124a157848273ffffffffffffffffffffffffffffffffffffffff93518203612480575b521690813b1561015e57600091612451916040519586809481937f2da334b50000000000000000000000000000000000000000000000000000000083528b60048401611ccb565b03925af19182156107ee57611fe59261246b575b50611ab1565b806107e2600061247a93610c85565b38612465565b6060850161249a612492848351611c7f565b835190611c92565b905261240a565b7f21f55fa80000000000000000000000000000000000000000000000000000000060005260046000fd5b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152919390602083602481845afa9283156107ee576000936125ab575b506040850192835181106124a1578261254b92828673ffffffffffffffffffffffffffffffffffffffff97518203612592575b52612cc1565b16803b1561015e576124516000939184926040519586809481937f2da334b50000000000000000000000000000000000000000000000000000000083528b60048401611ccb565b60608a016125a4612492848351611c7f565b9052612545565b6125c491935060203d81116121ad5761219f8183610c85565b9138612512565b7f40c01d000000000000000000000000000000000000000000000000000000000060005260046000fd5b60028103612645575090611fe061263e73ffffffffffffffffffffffffffffffffffffffff806126356020611fe597015160208082518301019101611b05565b9491931661285d565b9116612bed565b7fa00a107f0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b600581036126bd575090611fe073ffffffffffffffffffffffffffffffffffffffff6126b86126b16020611fe596015160208082518301019101611b32565b921661285d565b612aa8565b60048103612701575090611fe073ffffffffffffffffffffffffffffffffffffffff6126fc6126b16020611fe596015160208082518301019101611b32565b612986565b60038103612645575090611fe061274173ffffffffffffffffffffffffffffffffffffffff806126356020611fe597015160208082518301019101611b05565b911661288e565b5050915050565b60ff600554161561275c57565b7f8dfc202b0000000000000000000000000000000000000000000000000000000060005260046000fd5b60009060005b81518110156128585761279f8183611ac2565b515160018114612827575b600184116127fd576001841490816127f4575b506127ca5760010161278c565b7fa8245c830000000000000000000000000000000000000000000000000000000060005260046000fd5b905015386127bd565b7f73bbfa810000000000000000000000000000000000000000000000000000000060005260046000fd5b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461184e57600101926127aa565b505050565b73ffffffffffffffffffffffffffffffffffffffff8116600181036128825750503390565b6002036114b457503090565b90919073ffffffffffffffffffffffffffffffffffffffff16806128e0575061016e917f80000000000000000000000000000000000000000000000000000000000000008203612e7757479150612e77565b7f80000000000000000000000000000000000000000000000000000000000000008214612912575b9161016e92612cc1565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015292909150602083602481855afa80156107ee5761016e93600091612967575b5091909250612908565b612980915060203d6020116121ad5761219f8183610c85565b3861295d565b907f80000000000000000000000000000000000000000000000000000000000000008103612a755750475b806129ba575050565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f1691823b1561015e576040517fd0e30db000000000000000000000000000000000000000000000000000000000815260008160048186885af180156107ee57612a60575b503073ffffffffffffffffffffffffffffffffffffffff821603612a5757505050565b61016e92612cc1565b806107e26000612a6f93610c85565b38612a34565b478111156129b1575b7f6a12f1040000000000000000000000000000000000000000000000000000000060005260046000fd5b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152909173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f1690602083602481855afa9283156107ee57600093612bcc575b508210612a7e5781612b3757505050565b803b1561015e57600060405180927f2e1a7d4d000000000000000000000000000000000000000000000000000000008252818381612b7d88600483019190602083019252565b03925af180156107ee57612bb7575b503073ffffffffffffffffffffffffffffffffffffffff831603612bae575050565b61016e91612e77565b806107e26000612bc693610c85565b38612b8c565b612be691935060203d6020116121ad5761219f8183610c85565b9138612b26565b90919073ffffffffffffffffffffffffffffffffffffffff1680612c1d575047908110612a7e5780612bae575050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290929091602083602481875afa9283156107ee57600093612ca0575b508210612c765781612a5757505050565b7f675cae380000000000000000000000000000000000000000000000000000000060005260046000fd5b612cba91935060203d6020116121ad5761219f8183610c85565b9138612c65565b91604460209260009273ffffffffffffffffffffffffffffffffffffffff604051927fa9059cbb000000000000000000000000000000000000000000000000000000008452166004830152602482015282855af19081601f3d11600160005114161516612d8f575b5015612d3157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b3b153d1715905038612d29565b91604460209260009273ffffffffffffffffffffffffffffffffffffffff604051927f095ea7b3000000000000000000000000000000000000000000000000000000008452166004830152602482015282855af19081601f3d11600160005114161516612e6a575b5015612e0c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f415050524f56455f4641494c45440000000000000000000000000000000000006044820152fd5b3b153d1715905038612e04565b600080809381935af115612e8757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152fdfea2646970667358221220c792c7b37f5fb9db7b5aef72f9c83429397e1afb7adaa1b9d264a89ab9e6154164736f6c634300081a0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000702099e284f23da733c03b461c7571a742782fc2000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00000000000000000000000031c2f6fcff4f8759b3bd5bf0e1084a055615c768

-----Decoded View---------------
Arg [0] : owner (address): 0x702099e284f23Da733C03B461C7571a742782FC2
Arg [1] : weth (address): 0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f
Arg [2] : permit2 (address): 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000702099e284f23da733c03b461c7571a742782fc2
Arg [1] : 000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f
Arg [2] : 00000000000000000000000031c2f6fcff4f8759b3bd5bf0e1084a055615c768


Block Transaction Gas Used Reward
view all blocks sequenced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.