ETH Price: $3,287.97 (-1.27%)

Contract

0xF5e10380213880111522dd0efD3dbb45b9f62Bcc
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
All Batch214636282024-12-23 7:14:111 min ago1734938051IN
0xF5e10380...5b9f62Bcc
0 ETH0.00053784.64035393
All Batch214635602024-12-23 7:00:3515 mins ago1734937235IN
0xF5e10380...5b9f62Bcc
0 ETH0.000545794.73831561
All Batch214635202024-12-23 6:52:3523 mins ago1734936755IN
0xF5e10380...5b9f62Bcc
0 ETH0.000416954.77616603
All Batch214635052024-12-23 6:49:3526 mins ago1734936575IN
0xF5e10380...5b9f62Bcc
0 ETH0.000393844.89507819
All Batch214635042024-12-23 6:49:2326 mins ago1734936563IN
0xF5e10380...5b9f62Bcc
0 ETH0.000419564.90463601
Executex Swap An...214633872024-12-23 6:25:4749 mins ago1734935147IN
0xF5e10380...5b9f62Bcc
0 ETH0.001232024.69528704
All Batch214633692024-12-23 6:22:1153 mins ago1734934931IN
0xF5e10380...5b9f62Bcc
0 ETH0.00069746.05578509
All Batch214629802024-12-23 5:03:592 hrs ago1734930239IN
0xF5e10380...5b9f62Bcc
0 ETH0.000395564.68127131
All Batch214629062024-12-23 4:49:112 hrs ago1734929351IN
0xF5e10380...5b9f62Bcc
0 ETH0.000552595.24051298
All Batch214628362024-12-23 4:35:112 hrs ago1734928511IN
0xF5e10380...5b9f62Bcc
0 ETH0.000519394.50960719
All Batch214627172024-12-23 4:11:113 hrs ago1734927071IN
0xF5e10380...5b9f62Bcc
0 ETH0.000493755.65666343
All Batch214627162024-12-23 4:10:593 hrs ago1734927059IN
0xF5e10380...5b9f62Bcc
0 ETH0.000573055.89892838
All Batch214626962024-12-23 4:06:593 hrs ago1734926819IN
0xF5e10380...5b9f62Bcc
0 ETH0.000682035.92172123
All Batch214626942024-12-23 4:06:353 hrs ago1734926795IN
0xF5e10380...5b9f62Bcc
0 ETH0.000456375.67218047
All Batch214626722024-12-23 4:02:113 hrs ago1734926531IN
0xF5e10380...5b9f62Bcc
0 ETH0.00071136.17589255
All Batch214626402024-12-23 3:55:473 hrs ago1734926147IN
0xF5e10380...5b9f62Bcc
0 ETH0.000453744.62591334
All Batch214626392024-12-23 3:55:353 hrs ago1734926135IN
0xF5e10380...5b9f62Bcc
0 ETH0.000425484.97317247
All Batch214624752024-12-23 3:22:233 hrs ago1734924143IN
0xF5e10380...5b9f62Bcc
0 ETH0.000796888.14921881
All Batch214624302024-12-23 3:13:114 hrs ago1734923591IN
0xF5e10380...5b9f62Bcc
0 ETH0.000747527.64444287
All Batch214622312024-12-23 2:32:594 hrs ago1734921179IN
0xF5e10380...5b9f62Bcc
0 ETH0.000669356.34788927
All Batch214621142024-12-23 2:09:355 hrs ago1734919775IN
0xF5e10380...5b9f62Bcc
0 ETH0.000427345.31217522
All Batch214618472024-12-23 1:15:475 hrs ago1734916547IN
0xF5e10380...5b9f62Bcc
0 ETH0.000554145.66756139
All Batch214612532024-12-22 23:15:597 hrs ago1734909359IN
0xF5e10380...5b9f62Bcc
0 ETH0.000654075.67897784
All Batch214612362024-12-22 23:12:238 hrs ago1734909143IN
0xF5e10380...5b9f62Bcc
0 ETH0.000450645.16135971
All Batch214612332024-12-22 23:11:478 hrs ago1734909107IN
0xF5e10380...5b9f62Bcc
0 ETH0.000518595.33830724
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
214635052024-12-23 6:49:3526 mins ago1734936575
0xF5e10380...5b9f62Bcc
1.06059011 ETH
214635022024-12-23 6:48:5926 mins ago1734936539
0xF5e10380...5b9f62Bcc
1.06144 ETH
214634532024-12-23 6:39:1136 mins ago1734935951
0xF5e10380...5b9f62Bcc
0.3 ETH
214633872024-12-23 6:25:4749 mins ago1734935147
0xF5e10380...5b9f62Bcc
0.00747633 ETH
214633512024-12-23 6:18:3557 mins ago1734934715
0xF5e10380...5b9f62Bcc
0.155 ETH
214629062024-12-23 4:49:112 hrs ago1734929351
0xF5e10380...5b9f62Bcc
0.00636289 ETH
214627982024-12-23 4:27:232 hrs ago1734928043
0xF5e10380...5b9f62Bcc
0.029 ETH
214626942024-12-23 4:06:353 hrs ago1734926795
0xF5e10380...5b9f62Bcc
0.22847579 ETH
214622312024-12-23 2:32:594 hrs ago1734921179
0xF5e10380...5b9f62Bcc
0.02647677 ETH
214621972024-12-23 2:26:114 hrs ago1734920771
0xF5e10380...5b9f62Bcc
0.02914859 ETH
214621142024-12-23 2:09:355 hrs ago1734919775
0xF5e10380...5b9f62Bcc
0.03130987 ETH
214617072024-12-23 0:47:476 hrs ago1734914867
0xF5e10380...5b9f62Bcc
0.0143 ETH
214610612024-12-22 22:37:238 hrs ago1734907043
0xF5e10380...5b9f62Bcc
0.01148134 ETH
214607772024-12-22 21:39:599 hrs ago1734903599
0xF5e10380...5b9f62Bcc
0.02739269 ETH
214606752024-12-22 21:19:119 hrs ago1734902351
0xF5e10380...5b9f62Bcc
0.01 ETH
214606602024-12-22 21:16:119 hrs ago1734902171
0xF5e10380...5b9f62Bcc
0.25193027 ETH
214605742024-12-22 20:58:5910 hrs ago1734901139
0xF5e10380...5b9f62Bcc
0.66 ETH
214603422024-12-22 20:12:1111 hrs ago1734898331
0xF5e10380...5b9f62Bcc
0.02915589 ETH
214603262024-12-22 20:08:5911 hrs ago1734898139
0xF5e10380...5b9f62Bcc
0.03695512 ETH
214603192024-12-22 20:07:3511 hrs ago1734898055
0xF5e10380...5b9f62Bcc
0.02791218 ETH
214603102024-12-22 20:05:4711 hrs ago1734897947
0xF5e10380...5b9f62Bcc
0.17117713 ETH
214603022024-12-22 20:04:1111 hrs ago1734897851
0xF5e10380...5b9f62Bcc
0.30825737 ETH
214602702024-12-22 19:57:4711 hrs ago1734897467
0xF5e10380...5b9f62Bcc
0.03859786 ETH
214598072024-12-22 18:24:3512 hrs ago1734891875
0xF5e10380...5b9f62Bcc
0.00779467 ETH
214597712024-12-22 18:17:2312 hrs ago1734891443
0xF5e10380...5b9f62Bcc
0.01 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vault

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 800 runs

Other Settings:
paris EvmVersion, MIT license
File 1 of 17 : Vault.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "SafeERC20.sol";
import "IVault.sol";
import "IKeyManager.sol";
import "ICFReceiver.sol";
import "Shared.sol";
import "Deposit.sol";
import "AggKeyNonceConsumer.sol";
import "GovernanceCommunityGuarded.sol";

/**
 * @title    Vault contract
 * @notice   The vault for holding and transferring native or ERC20 tokens and deploying contracts for
 *           fetching individual deposits. It also allows users to do cross-chain swaps and(or) calls by
 *           making a function call directly to this contract.
 */
contract Vault is IVault, AggKeyNonceConsumer, GovernanceCommunityGuarded {
    using SafeERC20 for IERC20;

    uint256 private constant _AGG_KEY_EMERGENCY_TIMEOUT = 3 days;
    uint256 private constant _GAS_TO_FORWARD = 8_000;
    uint256 private constant _FINALIZE_GAS_BUFFER = 30_000;

    constructor(IKeyManager keyManager) AggKeyNonceConsumer(keyManager) {}

    /// @dev   Get the governor address from the KeyManager. This is called by the onlyGovernor
    ///        modifier in the GovernanceCommunityGuarded. This logic can't be moved to the
    ///        GovernanceCommunityGuarded since it requires a reference to the KeyManager.
    function _getGovernor() internal view override returns (address) {
        return getKeyManager().getGovernanceKey();
    }

    /// @dev   Get the community key from the KeyManager. This is called by the isCommunityKey
    ///        modifier in the GovernanceCommunityGuarded. This logic can't be moved to the
    ///        GovernanceCommunityGuarded since it requires a reference to the KeyManager.
    function _getCommunityKey() internal view override returns (address) {
        return getKeyManager().getCommunityKey();
    }

    /// @dev   Ensure that a new keyManager has the getGovernanceKey(), getCommunityKey()
    ///        and getLastValidateTime() are implemented. These are functions required for
    ///        this contract to at least be able to use the emergency mechanism.
    function _checkUpdateKeyManager(IKeyManager keyManager, bool omitChecks) internal view override {
        address newGovKey = keyManager.getGovernanceKey();
        address newCommKey = keyManager.getCommunityKey();
        uint256 lastValidateTime = keyManager.getLastValidateTime();

        if (!omitChecks) {
            // Ensure that the keys are the same
            require(newGovKey == _getGovernor() && newCommKey == _getCommunityKey());

            Key memory newAggKey = keyManager.getAggregateKey();
            Key memory currentAggKey = getKeyManager().getAggregateKey();

            require(
                newAggKey.pubKeyX == currentAggKey.pubKeyX && newAggKey.pubKeyYParity == currentAggKey.pubKeyYParity
            );

            // Ensure that the last validate time is not in the future
            require(lastValidateTime <= block.timestamp);
        } else {
            // Check that the addresses have been initialized
            require(newGovKey != address(0) && newCommKey != address(0));
        }
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                  Transfer and Fetch                      //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Can do a combination of all fcns in this contract. It first fetches all
     *          deposits , then it performs all transfers specified with the rest
     *          of the inputs, the same as transferBatch (where all inputs are again required
     *          to be of equal length - however the lengths of the fetch inputs do not have to
     *          be equal to lengths of the transfer inputs). Fetches/transfers of native tokens are
     *          indicated with 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE as the token address.
     * @dev     FetchAndDeploy is executed first to handle the edge case , which probably shouldn't
     *          happen anyway, where a deploy and a fetch for the same address are in the same batch.
     *          Transfers are executed last to ensure that all fetching has been completed first.
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param deployFetchParamsArray    The array of deploy and fetch parameters
     * @param fetchParamsArray    The array of fetch parameters
     * @param transferParamsArray The array of transfer parameters
     */
    function allBatch(
        SigData calldata sigData,
        DeployFetchParams[] calldata deployFetchParamsArray,
        FetchParams[] calldata fetchParamsArray,
        TransferParams[] calldata transferParamsArray
    )
        external
        override
        onlyNotSuspended
        consumesKeyNonce(
            sigData,
            keccak256(abi.encode(this.allBatch.selector, deployFetchParamsArray, fetchParamsArray, transferParamsArray))
        )
    {
        // Fetch by deploying new deposits
        _deployAndFetchBatch(deployFetchParamsArray);

        // Fetch from already deployed deposits
        _fetchBatch(fetchParamsArray);

        // Send all transfers
        _transferBatch(transferParamsArray);
    }

    /**
     * @notice  Same functionality as allBatch but removing the contract deployments
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param fetchParamsArray    The array of fetch parameters
     * @param transferParamsArray The array of transfer parameters
     */
    function allBatchV2(
        SigData calldata sigData,
        FetchParams[] calldata fetchParamsArray,
        TransferParams[] calldata transferParamsArray
    )
        external
        override
        onlyNotSuspended
        consumesKeyNonce(
            sigData,
            keccak256(abi.encode(this.allBatchV2.selector, fetchParamsArray, transferParamsArray))
        )
    {
        // Fetch from already deployed deposits
        _fetchBatch(fetchParamsArray);

        // Send all transfers
        _transferBatch(transferParamsArray);
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                          Transfers                       //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Transfers native tokens or a ERC20 token from this vault to a recipient
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param transferParams       The transfer parameters
     */
    function transfer(
        SigData calldata sigData,
        TransferParams calldata transferParams
    )
        external
        override
        onlyNotSuspended
        nzAddr(transferParams.token)
        nzAddr(transferParams.recipient)
        nzUint(transferParams.amount)
        consumesKeyNonce(sigData, keccak256(abi.encode(this.transfer.selector, transferParams)))
    {
        _transfer(transferParams.token, transferParams.recipient, transferParams.amount);
    }

    /**
     * @notice  Fallback transfer tokens from this vault to a recipient with all the gas.
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param transferParams  The transfer parameters

     */
    function transferFallback(
        SigData calldata sigData,
        TransferParams calldata transferParams
    )
        external
        onlyNotSuspended
        nzAddr(transferParams.token)
        nzAddr(transferParams.recipient)
        nzUint(transferParams.amount)
        consumesKeyNonce(sigData, keccak256(abi.encode(this.transferFallback.selector, transferParams)))
    {
        if (transferParams.token == _NATIVE_ADDR) {
            (bool success, ) = transferParams.recipient.call{value: transferParams.amount}("");
            require(success, "Vault: transfer fallback failed");
        } else {
            IERC20(transferParams.token).safeTransfer(transferParams.recipient, transferParams.amount);
        }
    }

    /**
     * @notice  Transfers native tokens or ERC20 tokens from this vault to recipients.
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param transferParamsArray The array of transfer parameters.
     */
    function transferBatch(
        SigData calldata sigData,
        TransferParams[] calldata transferParamsArray
    )
        external
        override
        onlyNotSuspended
        consumesKeyNonce(sigData, keccak256(abi.encode(this.transferBatch.selector, transferParamsArray)))
    {
        _transferBatch(transferParamsArray);
    }

    /**
     * @notice  Transfers native tokens or ERC20 tokens from this vault to recipients.
     * @param transferParamsArray The array of transfer parameters.
     */
    function _transferBatch(TransferParams[] calldata transferParamsArray) private {
        uint256 length = transferParamsArray.length;
        for (uint256 i = 0; i < length; ) {
            _transfer(transferParamsArray[i].token, transferParamsArray[i].recipient, transferParamsArray[i].amount);
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @notice  Transfers ETH or a token from this vault to a recipient
     * @dev     When transfering native tokens, using call function limiting the amount of gas so
     *          the receivers can't consume all the gas. Setting that amount of gas to more than
     *          2300 to future-proof the contract in case of opcode gas costs changing.
     * @dev     When transferring ERC20 tokens, if it fails ensure the transfer fails gracefully
     *          to not revert an entire batch. e.g. usdc blacklisted recipient. Following safeTransfer
     *          approach to support tokens that don't return a bool.
     * @param token The address of the token to be transferred
     * @param recipient The address of the recipient of the transfer
     * @param amount    The amount to transfer, in wei (uint)
     */
    function _transfer(address token, address payable recipient, uint256 amount) private {
        if (address(token) == _NATIVE_ADDR) {
            // solhint-disable-next-line avoid-low-level-calls
            (bool success, ) = recipient.call{gas: _GAS_TO_FORWARD, value: amount}("");
            if (!success) {
                emit TransferNativeFailed(recipient, amount);
            }
        } else {
            // solhint-disable-next-line avoid-low-level-calls
            (bool success, bytes memory returndata) = token.call(
                abi.encodeWithSelector(IERC20(token).transfer.selector, recipient, amount)
            );

            // No need to check token.code.length since it comes from a gated call
            bool transferred = success && (returndata.length == uint256(0) || abi.decode(returndata, (bool)));
            if (!transferred) emit TransferTokenFailed(recipient, amount, token, returndata);
        }
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                        Fetch Deposits                    //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Retrieves any token from multiple address, deterministically generated using
     *          create2, by creating a contract for that address, sending it to this vault.
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param deployFetchParamsArray    The array of deploy and fetch parameters
     */
    function deployAndFetchBatch(
        SigData calldata sigData,
        DeployFetchParams[] calldata deployFetchParamsArray
    )
        external
        override
        onlyNotSuspended
        consumesKeyNonce(sigData, keccak256(abi.encode(this.deployAndFetchBatch.selector, deployFetchParamsArray)))
    {
        _deployAndFetchBatch(deployFetchParamsArray);
    }

    function _deployAndFetchBatch(DeployFetchParams[] calldata deployFetchParamsArray) private {
        // Deploy deposit contracts
        uint256 length = deployFetchParamsArray.length;
        for (uint256 i = 0; i < length; ) {
            new Deposit{salt: deployFetchParamsArray[i].swapID}(deployFetchParamsArray[i].token);
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @notice  Retrieves any token addresses where a Deposit contract is already deployed.
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param fetchParamsArray    The array of fetch parameters
     */
    function fetchBatch(
        SigData calldata sigData,
        FetchParams[] calldata fetchParamsArray
    )
        external
        override
        onlyNotSuspended
        consumesKeyNonce(sigData, keccak256(abi.encode(this.fetchBatch.selector, fetchParamsArray)))
    {
        _fetchBatch(fetchParamsArray);
    }

    /**
     * @notice  Retrieves any token from multiple addresses where a Deposit contract is already deployed.
     *          It emits an event if the fetch fails.
     * @param fetchParamsArray    The array of fetch parameters
     */
    function _fetchBatch(FetchParams[] calldata fetchParamsArray) private {
        uint256 length = fetchParamsArray.length;
        for (uint256 i = 0; i < length; ) {
            Deposit(fetchParamsArray[i].fetchContract).fetch(fetchParamsArray[i].token);
            unchecked {
                ++i;
            }
        }
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //         Initiate cross-chain swaps (source chain)        //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Swaps native token for a token in another chain. The egress token will be transferred to the specified
     *          destination address on the destination chain.
     * @dev     Checking the validity of inputs shall be done as part of the event witnessing. Only the amount is checked
     *          to explicity indicate that an amount is required.  It isn't preventing spamming.
     * @param dstChain      The destination chain according to the Chainflip Protocol's nomenclature.
     * @param dstAddress    Bytes containing the destination address on the destination chain.
     * @param dstToken      Destination token to be swapped to.
     * @param cfParameters  Additional parameters to be passed to the Chainflip protocol.
     */
    function xSwapNative(
        uint32 dstChain,
        bytes memory dstAddress,
        uint32 dstToken,
        bytes calldata cfParameters
    ) external payable override onlyNotSuspended nzUint(msg.value) {
        emit SwapNative(dstChain, dstAddress, dstToken, msg.value, msg.sender, cfParameters);
    }

    /**
     * @notice  Swaps ERC20 token for a token in another chain. The desired token will be transferred to the specified
     *          destination address on the destination chain. The provided ERC20 token must be supported by the Chainflip Protocol.
     * @dev     Checking the validity of inputs shall be done as part of the event witnessing. Only the amount is checked
     *          to explicity indicate that an amount is required.
     * @param dstChain      The destination chain according to the Chainflip Protocol's nomenclature.
     * @param dstAddress    Bytes containing the destination address on the destination chain.
     * @param dstToken      Uint containing the specifics of the swap to be performed according to Chainflip's nomenclature.
     * @param srcToken      Address of the source token to swap.
     * @param amount        Amount of tokens to swap.
     * @param cfParameters  Additional parameters to be passed to the Chainflip protocol.
     */
    function xSwapToken(
        uint32 dstChain,
        bytes memory dstAddress,
        uint32 dstToken,
        IERC20 srcToken,
        uint256 amount,
        bytes calldata cfParameters
    ) external override onlyNotSuspended nzUint(amount) {
        srcToken.safeTransferFrom(msg.sender, address(this), amount);
        emit SwapToken(dstChain, dstAddress, dstToken, address(srcToken), amount, msg.sender, cfParameters);
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //     Initiate cross-chain call and swap (source chain)    //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Performs a cross-chain call to the destination address on the destination chain. Native tokens must be paid
     *          to this contract. The swap intent determines if the provided tokens should be swapped to a different token
     *          and transferred as part of the cross-chain call. Otherwise, all tokens are used as a payment for gas on the destination chain.
     *          The message parameter is transmitted to the destination chain as part of the cross-chain call.
     * @dev     Checking the validity of inputs shall be done as part of the event witnessing. Only the amount is checked
     *          to explicity inidcate that an amount is required. It isn't preventing spamming.
     * @param dstChain      The destination chain according to the Chainflip Protocol's nomenclature.
     * @param dstAddress    Bytes containing the destination address on the destination chain.
     * @param dstToken      Uint containing the specifics of the swap to be performed, if any, as part of the xCall. The string
     *                      must follow Chainflip's nomenclature. It can signal that no swap needs to take place
     *                      and the source token will be used for gas in a swapless xCall.
     * @param message       General purpose message to be sent to the egress chain. Notice that the Chainflip protocol has a limit size
     *                      for the message. Ensure that the message length is smaller that the limit before starting a swap.
     * @param gasAmount     The amount to be used for gas in the egress chain.
     * @param cfParameters  Additional parameters to be passed to the Chainflip protocol.
     */
    function xCallNative(
        uint32 dstChain,
        bytes calldata dstAddress,
        uint32 dstToken,
        bytes calldata message,
        uint256 gasAmount,
        bytes calldata cfParameters
    ) external payable override onlyNotSuspended nzUint(msg.value) {
        emit XCallNative(dstChain, dstAddress, dstToken, msg.value, msg.sender, message, gasAmount, cfParameters);
    }

    /**
     * @notice  Performs a cross-chain call to the destination chain and destination address. An ERC20 token amount
     *          needs to be approved to this contract. The ERC20 token must be supported by the Chainflip Protocol.
     *          The swap intent determines whether the provided tokens should be swapped to a different token
     *          by the Chainflip Protocol. If so, the swapped tokens will be transferred to the destination chain as part
     *          of the cross-chain call. Otherwise, the tokens are used as a payment for gas on the destination chain.
     *          The message parameter is transmitted to the destination chain as part of the cross-chain call.
     * @dev     Checking the validity of inputs shall be done as part of the event witnessing. Only the amount is checked
     *          to explicity indicate that an amount is required.
     * @param dstChain      The destination chain according to the Chainflip Protocol's nomenclature.
     * @param dstAddress    Bytes containing the destination address on the destination chain.
     * @param dstToken      Uint containing the specifics of the swap to be performed, if any, as part of the xCall. The string
     *                      must follow Chainflip's nomenclature. It can signal that no swap needs to take place
     *                      and the source token will be used for gas in a swapless xCall.
     * @param message       General purpose message to be sent to the egress chain. Notice that the Chainflip protocol has a limit size
     *                      for the message. Ensure that the message length is smaller that the limit before starting a swap.
     * @param gasAmount     The amount to be used for gas in the egress chain.
     * @param srcToken      Address of the source token.
     * @param amount        Amount of tokens to swap.
     * @param cfParameters  Additional parameters to be passed to the Chainflip protocol.
     */
    function xCallToken(
        uint32 dstChain,
        bytes memory dstAddress,
        uint32 dstToken,
        bytes calldata message,
        uint256 gasAmount,
        IERC20 srcToken,
        uint256 amount,
        bytes calldata cfParameters
    ) external override onlyNotSuspended nzUint(amount) {
        srcToken.safeTransferFrom(msg.sender, address(this), amount);
        emit XCallToken(
            dstChain,
            dstAddress,
            dstToken,
            address(srcToken),
            amount,
            msg.sender,
            message,
            gasAmount,
            cfParameters
        );
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                     Gas topups                           //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Add gas (topup) to an existing cross-chain call with the unique identifier swapID.
     *          Native tokens must be paid to this contract as part of the call.
     * @param swapID    The unique identifier for this swap (bytes32)
     */
    function addGasNative(bytes32 swapID) external payable override onlyNotSuspended nzUint(msg.value) {
        emit AddGasNative(swapID, msg.value);
    }

    /**
     * @notice  Add gas (topup) to an existing cross-chain call with the unique identifier swapID.
     *          A Chainflip supported token must be paid to this contract as part of the call.
     * @param swapID    The unique identifier for this swap (bytes32)
     * @param token     Address of the token to provide.
     * @param amount    Amount of tokens to provide.
     */
    function addGasToken(
        bytes32 swapID,
        uint256 amount,
        IERC20 token
    ) external override onlyNotSuspended nzUint(amount) {
        token.safeTransferFrom(msg.sender, address(this), amount);
        emit AddGasToken(swapID, amount, address(token));
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //      Execute cross-chain call and swap (dest. chain)     //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Transfers native tokens or an ERC20 token from this vault to a recipient and makes a function
     *          call completing a cross-chain swap and call. The ICFReceiver interface is expected on
     *          the receiver's address. A message is passed to the receiver along with other
     *          parameters specifying the origin of the swap.
     * @dev     Not checking nzUint(amount) to prevent reversions in edge cases (e.g. all input amount used for gas).
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param transferParams  The transfer parameters
     * @param srcChain        The source chain where the call originated from.
     * @param srcAddress      The address where the transfer originated within the ingress chain.
     * @param message         The message to be passed to the recipient.
     */
    function executexSwapAndCall(
        SigData calldata sigData,
        TransferParams calldata transferParams,
        uint32 srcChain,
        bytes calldata srcAddress,
        bytes calldata message
    )
        external
        override
        onlyNotSuspended
        nzAddr(transferParams.token)
        nzAddr(transferParams.recipient)
        consumesKeyNonce(
            sigData,
            keccak256(abi.encode(this.executexSwapAndCall.selector, transferParams, srcChain, srcAddress, message))
        )
    {
        // Logic in another internal function to avoid the stackTooDeep error
        _executexSwapAndCall(transferParams, srcChain, srcAddress, message);
    }

    /**
     * @notice Logic for transferring the tokens and calling the recipient. It's on the receiver to
     *         make sure the call doesn't revert, otherwise the tokens won't be transferred.
     *         The _transfer function is not used because we want to be able to embed the native token
     *         into the cfReceive call to avoid doing two external calls.
     *         In case of revertion the tokens will remain in the Vault. Therefore, the destination
     *         contract must ensure it doesn't revert e.g. using try-catch mechanisms.
     * @dev    In the case of the ERC20 transfer reverting, not handling the error to allow for tx replay.
     *         Also, to ensure the cfReceive call is made only if the transfer is successful.
     */
    function _executexSwapAndCall(
        TransferParams calldata transferParams,
        uint32 srcChain,
        bytes calldata srcAddress,
        bytes calldata message
    ) private {
        uint256 nativeAmount;

        if (transferParams.amount > 0) {
            if (transferParams.token == _NATIVE_ADDR) {
                nativeAmount = transferParams.amount;
            } else {
                IERC20(transferParams.token).safeTransfer(transferParams.recipient, transferParams.amount);
            }
        }

        ICFReceiver(transferParams.recipient).cfReceive{value: nativeAmount}(
            srcChain,
            srcAddress,
            message,
            transferParams.token,
            transferParams.amount
        );
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //          Execute cross-chain call (dest. chain)          //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Executes a cross-chain function call. The ICFReceiver interface is expected on
     *          the receiver's address. A message is passed to the receiver along with other
     *          parameters specifying the origin of the swap. This is used for cross-chain messaging
     *          without any swap taking place on the Chainflip Protocol.
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param srcChain       The source chain where the call originated from.
     * @param srcAddress     The address where the transfer originated from in the ingressParams.
     * @param message        The message to be passed to the recipient.
     */
    function executexCall(
        SigData calldata sigData,
        address recipient,
        uint32 srcChain,
        bytes calldata srcAddress,
        bytes calldata message
    )
        external
        override
        onlyNotSuspended
        nzAddr(recipient)
        consumesKeyNonce(
            sigData,
            keccak256(abi.encode(this.executexCall.selector, recipient, srcChain, srcAddress, message))
        )
    {
        ICFReceiver(recipient).cfReceivexCall(srcChain, srcAddress, message);
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                 Auxiliary chain actions                  //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Transfer funds and pass calldata to be executed on a Multicall contract.
     * @dev     For safety purposes it's preferred to execute calldata externally with
     *          a limited amount of funds instead of executing arbitrary calldata here.
     * @dev     Calls are not reverted upon Multicall.run() failure so the nonce gets consumed. The 
     *          gasMulticall parameters is needed to prevent an insufficient gas griefing attack. 
     *          The _GAS_BUFFER is a conservative estimation of the gas required to finalize the call.
     * @param sigData         Struct containing the signature data over the message
     *                        to verify, signed by the aggregate key.
     * @param transferParams  The transfer parameters inluding the token and amount to be transferred
     *                        and the multicall contract address.
     * @param calls           Array of actions to be executed.
     * @param gasMulticall    Gas that must be forwarded to the multicall.

     */
    function executeActions(
        SigData calldata sigData,
        TransferParams calldata transferParams,
        IMulticall.Call[] calldata calls,
        uint256 gasMulticall
    )
        external
        override
        onlyNotSuspended
        consumesKeyNonce(
            sigData,
            keccak256(abi.encode(this.executeActions.selector, transferParams, calls, gasMulticall))
        )
    {
        // Fund and run multicall
        uint256 valueToSend;

        if (transferParams.amount > 0) {
            if (transferParams.token == _NATIVE_ADDR) {
                valueToSend = transferParams.amount;
            } else {
                IERC20(transferParams.token).approve(transferParams.recipient, transferParams.amount);
            }
        }

        // Ensure that the amount of gas supplied to the call to the Multicall contract is at least the gas
        // limit specified. We can do this by enforcing that we still have gasMulticall + gas buffer available.
        // The gas buffer is to ensure there is enough gas to finalize the call, including a safety margin.
        // The 63/64 rule specified in EIP-150 needs to be taken into account.
        require(gasleft() >= ((gasMulticall + _FINALIZE_GAS_BUFFER) * 64) / 63, "Vault: insufficient gas");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory reason) = transferParams.recipient.call{
            gas: gasleft() - _FINALIZE_GAS_BUFFER,
            value: valueToSend
        }(abi.encodeWithSelector(IMulticall.run.selector, calls, transferParams.token, transferParams.amount));

        if (!success) {
            if (transferParams.amount > 0 && transferParams.token != _NATIVE_ADDR) {
                IERC20(transferParams.token).approve(transferParams.recipient, 0);
            }
            emit ExecuteActionsFailed(transferParams.recipient, transferParams.amount, transferParams.token, reason);
        } else {
            require(transferParams.recipient.code.length > 0);
        }
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                        Governance                        //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice Withdraw all funds to governance address in case of emergency. This withdrawal needs
     *         to be approved by the Community and it can only be executed if no nonce from the
     *         current AggKey had been consumed in _AGG_KEY_TIMEOUT time. It is a last resort and
     *         can be used to rectify an emergency.
     * @param tokens    The addresses of the tokens to be transferred
     */
    function govWithdraw(
        address[] calldata tokens
    ) external override onlyGovernor onlyCommunityGuardDisabled onlySuspended timeoutEmergency {
        // Could use msg.sender or getGovernor() but hardcoding the get call just for extra safety
        address payable recipient = payable(getKeyManager().getGovernanceKey());

        // Transfer all native tokens and ERC20 Tokens
        for (uint256 i = 0; i < tokens.length; i++) {
            if (tokens[i] == _NATIVE_ADDR) {
                _transfer(_NATIVE_ADDR, recipient, address(this).balance);
            } else {
                _transfer(tokens[i], recipient, IERC20(tokens[i]).balanceOf(address(this)));
            }
        }
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                          Modifiers                       //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /// @dev    Check that no nonce has been consumed in the last 3 days - emergency
    modifier timeoutEmergency() {
        require(
            block.timestamp - getKeyManager().getLastValidateTime() >= _AGG_KEY_EMERGENCY_TIMEOUT,
            "Vault: not enough time"
        );
        _;
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                          Fallbacks                       //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /// @dev For receiving native tokens from the Deposit contracts
    receive() external payable {
        emit FetchedNative(msg.sender, msg.value);
    }
}

File 2 of 17 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "IERC20.sol";
import "draft-IERC20Permit.sol";
import "Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 3 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` 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 amount
    ) external returns (bool);
}

File 4 of 17 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 5 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 6 of 17 : IVault.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IAggKeyNonceConsumer.sol";
import "IGovernanceCommunityGuarded.sol";
import "IMulticall.sol";

/**
 * @title    Vault interface
 * @notice   The interface for functions Vault implements
 */
interface IVault is IGovernanceCommunityGuarded, IAggKeyNonceConsumer {
    event FetchedNative(address indexed sender, uint256 amount);

    event TransferNativeFailed(address payable indexed recipient, uint256 amount);
    event TransferTokenFailed(address payable indexed recipient, uint256 amount, address indexed token, bytes reason);

    event SwapNative(
        uint32 dstChain,
        bytes dstAddress,
        uint32 dstToken,
        uint256 amount,
        address indexed sender,
        bytes cfParameters
    );
    event SwapToken(
        uint32 dstChain,
        bytes dstAddress,
        uint32 dstToken,
        address srcToken,
        uint256 amount,
        address indexed sender,
        bytes cfParameters
    );

    /// @dev bytes parameters is not indexed because indexing a dynamic type for it to be filtered
    ///      makes it so we won't be able to decode it unless we specifically search for it. If we want
    ///      to filter it and decode it then we would need to have both the indexed and the non-indexed
    ///      version in the event. That is unnecessary.
    event XCallNative(
        uint32 dstChain,
        bytes dstAddress,
        uint32 dstToken,
        uint256 amount,
        address indexed sender,
        bytes message,
        uint256 gasAmount,
        bytes cfParameters
    );
    event XCallToken(
        uint32 dstChain,
        bytes dstAddress,
        uint32 dstToken,
        address srcToken,
        uint256 amount,
        address indexed sender,
        bytes message,
        uint256 gasAmount,
        bytes cfParameters
    );

    event AddGasNative(bytes32 swapID, uint256 amount);
    event AddGasToken(bytes32 swapID, uint256 amount, address token);

    event ExecuteActionsFailed(
        address payable indexed multicallAddress,
        uint256 amount,
        address indexed token,
        bytes reason
    );

    function allBatch(
        SigData calldata sigData,
        DeployFetchParams[] calldata deployFetchParamsArray,
        FetchParams[] calldata fetchParamsArray,
        TransferParams[] calldata transferParamsArray
    ) external;

    function allBatchV2(
        SigData calldata sigData,
        FetchParams[] calldata fetchParamsArray,
        TransferParams[] calldata transferParamsArray
    ) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                          Transfers                       //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function transfer(SigData calldata sigData, TransferParams calldata transferParams) external;

    function transferBatch(SigData calldata sigData, TransferParams[] calldata transferParamsArray) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                        Fetch Deposits                    //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function deployAndFetchBatch(
        SigData calldata sigData,
        DeployFetchParams[] calldata deployFetchParamsArray
    ) external;

    function fetchBatch(SigData calldata sigData, FetchParams[] calldata fetchParamsArray) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //         Initiate cross-chain swaps (source chain)        //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function xSwapToken(
        uint32 dstChain,
        bytes calldata dstAddress,
        uint32 dstToken,
        IERC20 srcToken,
        uint256 amount,
        bytes calldata cfParameters
    ) external;

    function xSwapNative(
        uint32 dstChain,
        bytes calldata dstAddress,
        uint32 dstToken,
        bytes calldata cfParameters
    ) external payable;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //     Initiate cross-chain call and swap (source chain)    //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function xCallNative(
        uint32 dstChain,
        bytes calldata dstAddress,
        uint32 dstToken,
        bytes calldata message,
        uint256 gasAmount,
        bytes calldata cfParameters
    ) external payable;

    function xCallToken(
        uint32 dstChain,
        bytes calldata dstAddress,
        uint32 dstToken,
        bytes calldata message,
        uint256 gasAmount,
        IERC20 srcToken,
        uint256 amount,
        bytes calldata cfParameters
    ) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                     Gas topups                           //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function addGasNative(bytes32 swapID) external payable;

    function addGasToken(bytes32 swapID, uint256 amount, IERC20 token) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //      Execute cross-chain call and swap (dest. chain)     //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function executexSwapAndCall(
        SigData calldata sigData,
        TransferParams calldata transferParams,
        uint32 srcChain,
        bytes calldata srcAddress,
        bytes calldata message
    ) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //          Execute cross-chain call (dest. chain)          //
    //                                                          //
    //////////////////////////////////////////////////////////////
    function executexCall(
        SigData calldata sigData,
        address recipient,
        uint32 srcChain,
        bytes calldata srcAddress,
        bytes calldata message
    ) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                 Auxiliary chain actions                  //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function executeActions(
        SigData calldata sigData,
        TransferParams calldata transferParams,
        IMulticall.Call[] calldata calls,
        uint256 gasMulticall
    ) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                        Governance                        //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function govWithdraw(address[] calldata tokens) external;
}

File 7 of 17 : IAggKeyNonceConsumer.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IShared.sol";
import "IKeyManager.sol";

/**
 * @title    AggKeyNonceConsumer interface
 */

interface IAggKeyNonceConsumer is IShared {
    event UpdatedKeyManager(address keyManager);

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                  State-changing functions                //
    //                                                          //
    //////////////////////////////////////////////////////////////
    /**
     * @notice  Update KeyManager reference. Used if KeyManager contract is updated
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param keyManager New KeyManager's address
     * @param omitChecks Allow the omission of the extra checks in a special case
     */
    function updateKeyManager(SigData calldata sigData, IKeyManager keyManager, bool omitChecks) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                          Getters                         //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Get the KeyManager address/interface that's used to validate sigs
     * @return  The KeyManager (IKeyManager)
     */
    function getKeyManager() external view returns (IKeyManager);
}

File 8 of 17 : IShared.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "IERC20.sol";

/**
 * @title    Shared interface
 * @notice   Holds structs needed by other interfaces
 */
interface IShared {
    /**
     * @dev  SchnorrSECP256K1 requires that each key has a public key part (x coordinate),
     *       a parity for the y coordinate (0 if the y ordinate of the public key is even, 1
     *       if it's odd)
     */
    struct Key {
        uint256 pubKeyX;
        uint8 pubKeyYParity;
    }

    /**
     * @dev  Contains a signature and the nonce used to create it. Also the recovered address
     *       to check that the signature is valid
     */
    struct SigData {
        uint256 sig;
        uint256 nonce;
        address kTimesGAddress;
    }

    /**
     * @param token The address of the token to be transferred
     * @param recipient The address of the recipient of the transfer
     * @param amount    The amount to transfer, in wei (uint)
     */
    struct TransferParams {
        address token;
        address payable recipient;
        uint256 amount;
    }

    /**
     * @param swapID    The unique identifier for this swap (bytes32), used for create2
     * @param token     The token to be transferred
     */
    struct DeployFetchParams {
        bytes32 swapID;
        address token;
    }

    /**
     * @param fetchContract   The address of the deployed Deposit contract
     * @param token     The token to be transferred
     */
    struct FetchParams {
        address payable fetchContract;
        address token;
    }
}

File 9 of 17 : IKeyManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IShared.sol";

/**
 * @title    KeyManager interface
 * @notice   The interface for functions KeyManager implements
 */
interface IKeyManager is IShared {
    event AggKeySetByAggKey(Key oldAggKey, Key newAggKey);
    event AggKeySetByGovKey(Key oldAggKey, Key newAggKey);
    event GovKeySetByAggKey(address oldGovKey, address newGovKey);
    event GovKeySetByGovKey(address oldGovKey, address newGovKey);
    event CommKeySetByAggKey(address oldCommKey, address newCommKey);
    event CommKeySetByCommKey(address oldCommKey, address newCommKey);
    event SignatureAccepted(SigData sigData, address signer);
    event GovernanceAction(bytes32 message);

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                  State-changing functions                //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function consumeKeyNonce(SigData memory sigData, bytes32 contractMsgHash) external;

    function setAggKeyWithAggKey(SigData memory sigData, Key memory newAggKey) external;

    function setAggKeyWithGovKey(Key memory newAggKey) external;

    function setGovKeyWithAggKey(SigData calldata sigData, address newGovKey) external;

    function setGovKeyWithGovKey(address newGovKey) external;

    function setCommKeyWithAggKey(SigData calldata sigData, address newCommKey) external;

    function setCommKeyWithCommKey(address newCommKey) external;

    function govAction(bytes32 message) external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                  Non-state-changing functions            //
    //                                                          //
    //////////////////////////////////////////////////////////////

    function getAggregateKey() external view returns (Key memory);

    function getGovernanceKey() external view returns (address);

    function getCommunityKey() external view returns (address);

    function isNonceUsedByAggKey(uint256 nonce) external view returns (bool);

    function getLastValidateTime() external view returns (uint256);
}

File 10 of 17 : IGovernanceCommunityGuarded.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IShared.sol";

/**
 * @title    GovernanceCommunityGuarded interface
 */

interface IGovernanceCommunityGuarded is IShared {
    event CommunityGuardDisabled(bool communityGuardDisabled);
    event Suspended(bool suspended);

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                  State-changing functions                //
    //                                                          //
    //////////////////////////////////////////////////////////////
    /**
     * @notice  Enable Community Guard
     */

    function enableCommunityGuard() external;

    /**
     * @notice  Disable Community Guard
     */
    function disableCommunityGuard() external;

    /**
     * @notice  Can be used to suspend contract execution - only executable by
     *          governance and only to be used in case of emergency.
     */
    function suspend() external;

    /**
     * @notice      Resume contract execution
     */
    function resume() external;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                          Getters                         //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Get the Community Key
     * @return  The CommunityKey
     */
    function getCommunityKey() external view returns (address);

    /**
     * @notice  Get the Community Guard state
     * @return  The Community Guard state
     */
    function getCommunityGuardDisabled() external view returns (bool);

    /**
     * @notice  Get suspended state
     * @return  The suspended state
     */
    function getSuspendedState() external view returns (bool);

    /**
     * @notice  Get governor address
     * @return  The governor address
     */
    function getGovernor() external view returns (address);
}

File 11 of 17 : IMulticall.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IMulticall {
    enum CallType {
        Default,
        FullTokenBalance,
        FullNativeBalance,
        CollectTokenBalance
    }

    struct Call {
        CallType callType;
        address target;
        uint256 value;
        bytes callData;
        bytes payload;
    }

    error AlreadyRunning();
    error CallFailed(uint256 callPosition, bytes reason);

    function run(Call[] calldata calls, address tokenIn, uint256 amountIn) external payable;
}

File 12 of 17 : ICFReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title    CF Receiver interface
 * @dev      The ICFReceiver interface is the interface required to receive tokens and
 *           cross-chain calls from the Chainflip Protocol.
 */
interface ICFReceiver {
    /**
     * @notice  Receiver of a cross-chain swap and call made by the Chainflip Protocol.

     * @param srcChain      The source chain according to the Chainflip Protocol's nomenclature.
     * @param srcAddress    Bytes containing the source address on the source chain.
     * @param message       The message sent on the source chain. This is a general purpose message.
     * @param token         Address of the token received. _NATIVE_ADDR if it's native tokens.
     * @param amount        Amount of tokens received. This will match msg.value for native tokens.
     */
    function cfReceive(
        uint32 srcChain,
        bytes calldata srcAddress,
        bytes calldata message,
        address token,
        uint256 amount
    ) external payable;

    /**
     * @notice  Receiver of a cross-chain call made by the Chainflip Protocol.

     * @param srcChain      The source chain according to the Chainflip Protocol's nomenclature.
     * @param srcAddress    Bytes containing the source address on the source chain.
     * @param message       The message sent on the source chain. This is a general purpose message.
     */
    function cfReceivexCall(uint32 srcChain, bytes calldata srcAddress, bytes calldata message) external;
}

File 13 of 17 : Shared.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IShared.sol";

/**
 * @title    Shared contract
 * @notice   Holds constants and modifiers that are used in multiple contracts
 * @dev      It would be nice if this could be a library, but modifiers can't be exported :(
 */

abstract contract Shared is IShared {
    /// @dev The address used to indicate whether transfer should send native or a token
    address internal constant _NATIVE_ADDR = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
    address internal constant _ZERO_ADDR = address(0);
    bytes32 internal constant _NULL = "";
    uint256 internal constant _E_18 = 1e18;

    /// @dev    Checks that a uint isn't zero/empty
    modifier nzUint(uint256 u) {
        require(u != 0, "Shared: uint input is empty");
        _;
    }

    /// @dev    Checks that an address isn't zero/empty
    modifier nzAddr(address a) {
        require(a != _ZERO_ADDR, "Shared: address input is empty");
        _;
    }

    /// @dev    Checks that a bytes32 isn't zero/empty
    modifier nzBytes32(bytes32 b) {
        require(b != _NULL, "Shared: bytes32 input is empty");
        _;
    }

    /// @dev    Checks that the pubKeyX is populated
    modifier nzKey(Key memory key) {
        require(key.pubKeyX != 0, "Shared: pubKeyX is empty");
        _;
    }
}

File 14 of 17 : Deposit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IERC20Lite.sol";

/**
 * @title    Deposit contract
 * @notice   Creates a contract with a known address and withdraws tokens from it.
 *           After deployment, the Vault will call fetch() to withdraw tokens.
 * @dev      Any change in this contract, including comments, will affect the final
 *           bytecode and therefore will affect the create2 derived addresses.
 *           Do NOT modify unless the consequences of doing so are fully understood.
 */
contract Deposit {
    address payable private immutable vault;

    /**
     * @notice  Upon deployment it fetches the tokens (native or ERC20) to the Vault.
     * @param token  The address of the token to fetch
     */
    constructor(address token) {
        vault = payable(msg.sender);
        // Slightly cheaper to use msg.sender instead of Vault.
        if (token == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) {
            // solhint-disable-next-line avoid-low-level-calls
            (bool success, ) = msg.sender.call{value: address(this).balance}("");
            require(success);
        } else {
            // IERC20Lite.transfer doesn't have a return bool to avoid reverts on non-standard ERC20s
            IERC20Lite(token).transfer(msg.sender, IERC20Lite(token).balanceOf(address(this)));
        }
    }

    /**
     * @notice  Allows the Vault to fetch ERC20 tokens from this contract.
     * @param token  The address of the token to fetch
     */
    function fetch(address token) external {
        require(msg.sender == vault);
        // IERC20Lite.transfer doesn't have a return bool to avoid reverts on non-standard ERC20s
        IERC20Lite(token).transfer(msg.sender, IERC20Lite(token).balanceOf(address(this)));
    }

    /// @notice Receives native tokens, emits an event and sends them to the Vault. Note that this
    // requires the sender to forward some more gas than for a simple transfer.
    receive() external payable {
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, ) = vault.call{value: address(this).balance}("");
        require(success);
    }
}

File 15 of 17 : IERC20Lite.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title    ERC20 Lite Interface
 * @notice   The interface for functions ERC20Lite implements. This is intended to
 *           be used only in the Deposit contract.
 * @dev      Any change in this contract, including comments, will affect the final
 *           bytecode and therefore will affect the create2 derived addresses.
 *           Do NOT modify unless the consequences of doing so are fully understood.
 */
interface IERC20Lite {
    /// @dev Removed the return bool to avoid reverts on non-standard ERC20s.
    function transfer(address, uint256) external;

    function balanceOf(address) external view returns (uint256);
}

File 16 of 17 : AggKeyNonceConsumer.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IKeyManager.sol";
import "IAggKeyNonceConsumer.sol";
import "Shared.sol";

/**
 * @title    AggKeyNonceConsumer contract
 * @notice   Manages the reference to the KeyManager contract. The address
 *           is set in the constructor and can only be updated with a valid
 *           signature validated by the current KeyManager contract. This shall
 *           be done if the KeyManager contract is updated.
 */
abstract contract AggKeyNonceConsumer is Shared, IAggKeyNonceConsumer {
    /// @dev    The KeyManager used to checks sigs used in functions here
    IKeyManager private _keyManager;

    constructor(IKeyManager keyManager) nzAddr(address(keyManager)) {
        _keyManager = keyManager;
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                  State-changing functions                //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Update KeyManager reference. Used if KeyManager contract is updated
     * @param sigData    Struct containing the signature data over the message
     *                   to verify, signed by the aggregate key.
     * @param keyManager New KeyManager's address
     * @param omitChecks Allow the omission of the extra checks in a special case
     */
    function updateKeyManager(
        SigData calldata sigData,
        IKeyManager keyManager,
        bool omitChecks
    )
        external
        override
        nzAddr(address(keyManager))
        consumesKeyNonce(sigData, keccak256(abi.encode(this.updateKeyManager.selector, keyManager, omitChecks)))
    {
        // Check that the new KeyManager is a contract
        require(address(keyManager).code.length > 0);

        // Allow the child to check compatibility with the new KeyManager
        _checkUpdateKeyManager(keyManager, omitChecks);

        _keyManager = keyManager;
        emit UpdatedKeyManager(address(keyManager));
    }

    /// @dev   This will be called when upgrading to a new KeyManager. This allows the child's contract
    ///        to check its compatibility with the new KeyManager. This is to prevent the contract from
    //         getting bricked. There is no good way to enforce the implementation of consumeKeyNonce().
    function _checkUpdateKeyManager(IKeyManager keyManager, bool omitChecks) internal view virtual;

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                          Getters                         //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Get the KeyManager address/interface that's used to validate sigs
     * @return  The KeyManager (IKeyManager)
     */
    function getKeyManager() public view override returns (IKeyManager) {
        return _keyManager;
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                         Modifiers                        //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /// @dev    Calls consumeKeyNonce in _keyManager
    modifier consumesKeyNonce(SigData calldata sigData, bytes32 contractMsgHash) {
        getKeyManager().consumeKeyNonce(sigData, contractMsgHash);
        _;
    }
}

File 17 of 17 : GovernanceCommunityGuarded.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IGovernanceCommunityGuarded.sol";
import "AggKeyNonceConsumer.sol";
import "Shared.sol";

/**
 * @title    GovernanceCommunityGuarded contract
 * @notice   Allows the governor to perform certain actions for the procotol's safety in
 *           case of emergency. The aim is to allow the governor to suspend execution of
 *           critical functions.
 *           Also, it allows the CommunityKey to safeguard certain functions so the
 *           governor can execute them iff the communityKey allows it.
 */
abstract contract GovernanceCommunityGuarded is Shared, IGovernanceCommunityGuarded {
    /// @dev    Community Guard Disabled
    bool private _communityGuardDisabled;

    /// @dev    Whether execution is suspended
    bool private _suspended = false;

    /**
     * @notice  Get the governor's address. The contracts inheriting this (StateChainGateway and Vault)
     *          get the governor's address from the KeyManager through the AggKeyNonceConsumer's
     *          inheritance. Therefore, the implementation of this function must be left
     *          to the children. This is not implemented as a virtual onlyGovernor modifier to force
     *          the children to implement this function - virtual modifiers don't enforce that.
     * @return  The governor's address
     */
    function _getGovernor() internal view virtual returns (address);

    /**
     * @notice  Get the community's address. The contracts inheriting this (StateChainGateway and Vault)
     *          get the community's address from the KeyManager through the AggKeyNonceConsumer's
     *          inheritance. Therefore, the implementation of this function must be left
     *          to the children. This is not implemented as a virtual onlyCommunityKey modifier to force
     *          the children to implement this function - virtual modifiers don't enforce that.
     * @return  The community's address
     */
    function _getCommunityKey() internal view virtual returns (address);

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                  State-changing functions                //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Enable Community Guard
     */
    function enableCommunityGuard() external override onlyCommunityKey onlyCommunityGuardDisabled {
        _communityGuardDisabled = false;
        emit CommunityGuardDisabled(false);
    }

    /**
     * @notice  Disable Community Guard
     */
    function disableCommunityGuard() external override onlyCommunityKey onlyCommunityGuardEnabled {
        _communityGuardDisabled = true;
        emit CommunityGuardDisabled(true);
    }

    /**
     * @notice Can be used to suspend contract execution - only executable by
     * governance and only to be used in case of emergency.
     */
    function suspend() external override onlyGovernor onlyNotSuspended {
        _suspended = true;
        emit Suspended(true);
    }

    /**
     * @notice      Resume contract execution
     */
    function resume() external override onlyGovernor onlySuspended {
        _suspended = false;
        emit Suspended(false);
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                          Getters                         //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /**
     * @notice  Get the Community Key
     * @return  The CommunityKey
     */
    function getCommunityKey() external view override returns (address) {
        return _getCommunityKey();
    }

    /**
     * @notice  Get the Community Guard state
     * @return  The Community Guard state
     */
    function getCommunityGuardDisabled() external view override returns (bool) {
        return _communityGuardDisabled;
    }

    /**
     * @notice  Get suspended state
     * @return  The suspended state
     */
    function getSuspendedState() external view override returns (bool) {
        return _suspended;
    }

    /**
     * @notice  Get governor address
     * @return  The governor address
     */
    function getGovernor() external view override returns (address) {
        return _getGovernor();
    }

    //////////////////////////////////////////////////////////////
    //                                                          //
    //                         Modifiers                        //
    //                                                          //
    //////////////////////////////////////////////////////////////

    /// @dev    Check that the caller is the Community Key address.
    modifier onlyCommunityKey() {
        require(msg.sender == _getCommunityKey(), "Governance: not Community Key");
        _;
    }

    /// @dev    Check that community has disabled the community guard.
    modifier onlyCommunityGuardDisabled() {
        require(_communityGuardDisabled, "Governance: community guard enabled");
        _;
    }

    /// @dev    Check that community has disabled the community guard.
    modifier onlyCommunityGuardEnabled() {
        require(!_communityGuardDisabled, "Governance: community guard disabled");
        _;
    }

    /// @notice Ensure that the caller is the governor address. Calls the getGovernor
    ///         function which is implemented by the children.
    modifier onlyGovernor() {
        require(msg.sender == _getGovernor(), "Governance: not governor");
        _;
    }

    // @notice Check execution is suspended
    modifier onlySuspended() {
        require(_suspended, "Governance: not suspended");
        _;
    }

    // @notice Check execution is not suspended
    modifier onlyNotSuspended() {
        require(!_suspended, "Governance: suspended");
        _;
    }
}

Settings
{
  "evmVersion": "paris",
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "libraries": {
    "Vault.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IKeyManager","name":"keyManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"swapID","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AddGasNative","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"swapID","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"AddGasToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"communityGuardDisabled","type":"bool"}],"name":"CommunityGuardDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address payable","name":"multicallAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"ExecuteActionsFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FetchedNative","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"suspended","type":"bool"}],"name":"Suspended","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"dstChain","type":"uint32"},{"indexed":false,"internalType":"bytes","name":"dstAddress","type":"bytes"},{"indexed":false,"internalType":"uint32","name":"dstToken","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"bytes","name":"cfParameters","type":"bytes"}],"name":"SwapNative","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"dstChain","type":"uint32"},{"indexed":false,"internalType":"bytes","name":"dstAddress","type":"bytes"},{"indexed":false,"internalType":"uint32","name":"dstToken","type":"uint32"},{"indexed":false,"internalType":"address","name":"srcToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"bytes","name":"cfParameters","type":"bytes"}],"name":"SwapToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address payable","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferNativeFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address payable","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"TransferTokenFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"keyManager","type":"address"}],"name":"UpdatedKeyManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"dstChain","type":"uint32"},{"indexed":false,"internalType":"bytes","name":"dstAddress","type":"bytes"},{"indexed":false,"internalType":"uint32","name":"dstToken","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"gasAmount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"cfParameters","type":"bytes"}],"name":"XCallNative","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"dstChain","type":"uint32"},{"indexed":false,"internalType":"bytes","name":"dstAddress","type":"bytes"},{"indexed":false,"internalType":"uint32","name":"dstToken","type":"uint32"},{"indexed":false,"internalType":"address","name":"srcToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"gasAmount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"cfParameters","type":"bytes"}],"name":"XCallToken","type":"event"},{"inputs":[{"internalType":"bytes32","name":"swapID","type":"bytes32"}],"name":"addGasNative","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"swapID","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"addGasToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"components":[{"internalType":"bytes32","name":"swapID","type":"bytes32"},{"internalType":"address","name":"token","type":"address"}],"internalType":"struct IShared.DeployFetchParams[]","name":"deployFetchParamsArray","type":"tuple[]"},{"components":[{"internalType":"address payable","name":"fetchContract","type":"address"},{"internalType":"address","name":"token","type":"address"}],"internalType":"struct IShared.FetchParams[]","name":"fetchParamsArray","type":"tuple[]"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IShared.TransferParams[]","name":"transferParamsArray","type":"tuple[]"}],"name":"allBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"components":[{"internalType":"address payable","name":"fetchContract","type":"address"},{"internalType":"address","name":"token","type":"address"}],"internalType":"struct IShared.FetchParams[]","name":"fetchParamsArray","type":"tuple[]"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IShared.TransferParams[]","name":"transferParamsArray","type":"tuple[]"}],"name":"allBatchV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"components":[{"internalType":"bytes32","name":"swapID","type":"bytes32"},{"internalType":"address","name":"token","type":"address"}],"internalType":"struct IShared.DeployFetchParams[]","name":"deployFetchParamsArray","type":"tuple[]"}],"name":"deployAndFetchBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableCommunityGuard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableCommunityGuard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IShared.TransferParams","name":"transferParams","type":"tuple"},{"components":[{"internalType":"enum IMulticall.CallType","name":"callType","type":"uint8"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bytes","name":"payload","type":"bytes"}],"internalType":"struct IMulticall.Call[]","name":"calls","type":"tuple[]"},{"internalType":"uint256","name":"gasMulticall","type":"uint256"}],"name":"executeActions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint32","name":"srcChain","type":"uint32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"executexCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IShared.TransferParams","name":"transferParams","type":"tuple"},{"internalType":"uint32","name":"srcChain","type":"uint32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"executexSwapAndCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"components":[{"internalType":"address payable","name":"fetchContract","type":"address"},{"internalType":"address","name":"token","type":"address"}],"internalType":"struct IShared.FetchParams[]","name":"fetchParamsArray","type":"tuple[]"}],"name":"fetchBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCommunityGuardDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCommunityKey","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGovernor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getKeyManager","outputs":[{"internalType":"contract IKeyManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSuspendedState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"govWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resume","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"suspend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IShared.TransferParams","name":"transferParams","type":"tuple"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IShared.TransferParams[]","name":"transferParamsArray","type":"tuple[]"}],"name":"transferBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IShared.TransferParams","name":"transferParams","type":"tuple"}],"name":"transferFallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"sig","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"kTimesGAddress","type":"address"}],"internalType":"struct IShared.SigData","name":"sigData","type":"tuple"},{"internalType":"contract IKeyManager","name":"keyManager","type":"address"},{"internalType":"bool","name":"omitChecks","type":"bool"}],"name":"updateKeyManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"dstChain","type":"uint32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint32","name":"dstToken","type":"uint32"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"uint256","name":"gasAmount","type":"uint256"},{"internalType":"bytes","name":"cfParameters","type":"bytes"}],"name":"xCallNative","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"dstChain","type":"uint32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint32","name":"dstToken","type":"uint32"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"uint256","name":"gasAmount","type":"uint256"},{"internalType":"contract IERC20","name":"srcToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"cfParameters","type":"bytes"}],"name":"xCallToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"dstChain","type":"uint32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint32","name":"dstToken","type":"uint32"},{"internalType":"bytes","name":"cfParameters","type":"bytes"}],"name":"xSwapNative","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"dstChain","type":"uint32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint32","name":"dstToken","type":"uint32"},{"internalType":"contract IERC20","name":"srcToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"cfParameters","type":"bytes"}],"name":"xSwapToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526000805460ff60a81b191690553480156200001e57600080fd5b5060405162004e5438038062004e548339810160408190526200004191620000c6565b80806001600160a01b0381166200009e5760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640160405180910390fd5b50600080546001600160a01b0319166001600160a01b039290921691909117905550620000f8565b600060208284031215620000d957600080fd5b81516001600160a01b0381168114620000f157600080fd5b9392505050565b614d4c80620001086000396000f3fe608060405260043610620001d35760003560e01c80637161fb9111620000ff578063b27588ef1162000095578063cc5916d9116200006c578063cc5916d91462000529578063dd687345146200054e578063df5ed9ea1462000565578063e6400bbe146200058a57600080fd5b8063b27588ef14620004ba578063b554712f14620004df578063bbddc2fb146200050457600080fd5b80637b884c5e11620000d65780637b884c5e14620004405780638d95e5591462000465578063aae9ba43146200047d578063b267e7f6146200049557600080fd5b80637161fb9114620003e35780637484606f14620003fa578063765849b9146200041f57600080fd5b80633f87b30f11620001755780634b0cfc00116200014c5780634b0cfc0014620003615780634fc07d7514620003815780635293178e14620003995780635f8c0f9a14620003be57600080fd5b80633f87b30f14620002e6578063448cfc85146200031757806349710b1b146200033c57600080fd5b80632971198e11620001aa5780632971198e146200026b57806329b7420114620002905780632ba5bc8a14620002c157600080fd5b8063046f7da2146200021557806304fc7da0146200022f57806307933dd2146200025457600080fd5b36620002105760405134815233907fa5df10d7a7c736bd7231e790267747aebface82ad6ee778d26a4aa99eb1c2f7b9060200160405180910390a2005b600080fd5b3480156200022257600080fd5b506200022d620005a2565b005b3480156200023c57600080fd5b506200022d6200024e3660046200368e565b620006b0565b6200022d6200026536600462003745565b620007be565b3480156200027857600080fd5b506200022d6200028a3660046200381d565b620008bd565b3480156200029d57600080fd5b50600054600160a81b900460ff165b60405190151581526020015b60405180910390f35b348015620002ce57600080fd5b506200022d620002e036600462003902565b620009c0565b348015620002f357600080fd5b50620002fe62000adc565b6040516001600160a01b039091168152602001620002b8565b3480156200032457600080fd5b506200022d620003363660046200399c565b62000aed565b3480156200034957600080fd5b506200022d6200035b36600462003a2a565b62000c96565b3480156200036e57600080fd5b506000546001600160a01b0316620002fe565b3480156200038e57600080fd5b50620002fe6200118f565b348015620003a657600080fd5b506200022d620003b836600462003a9e565b6200119b565b348015620003cb57600080fd5b506200022d620003dd36600462003b2f565b62001388565b6200022d620003f436600462003bd4565b620014b6565b3480156200040757600080fd5b506200022d6200041936600462003bee565b62001590565b3480156200042c57600080fd5b50600054600160a01b900460ff16620002ac565b3480156200044d57600080fd5b506200022d6200045f36600462003c34565b62001976565b3480156200047257600080fd5b506200022d62001a80565b3480156200048a57600080fd5b506200022d62001b91565b348015620004a257600080fd5b506200022d620004b436600462003c8e565b62001caa565b348015620004c757600080fd5b506200022d620004d936600462003cc8565b62001ffa565b348015620004ec57600080fd5b506200022d620004fe36600462003c8e565b620021c7565b3480156200051157600080fd5b506200022d6200052336600462003d58565b62002416565b3480156200053657600080fd5b506200022d6200054836600462003c34565b6200252d565b6200022d6200055f36600462003e48565b62002630565b3480156200057257600080fd5b506200022d6200058436600462003ece565b62002723565b3480156200059757600080fd5b506200022d62002826565b620005ac62002922565b6001600160a01b0316336001600160a01b031614620006125760405162461bcd60e51b815260206004820152601860248201527f476f7665726e616e63653a206e6f7420676f7665726e6f72000000000000000060448201526064015b60405180910390fd5b600054600160a81b900460ff166200066d5760405162461bcd60e51b815260206004820152601960248201527f476f7665726e616e63653a206e6f742073757370656e64656400000000000000604482015260640162000609565b6000805460ff60a81b191681556040519081527f58e6c20b68c19f4d8dbc6206267af40b288342464b433205bb41e5b65c4016da906020015b60405180910390a1565b600054600160a81b900460ff1615620006fb5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b82806000036200074e5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b620007656001600160a01b03861633308762002993565b336001600160a01b03167f834b524d9f8ccbd31b00b671c896697b96eb4398c0f56e9386a21f5df61e3ce389898989898989604051620007ac979695949392919062003f98565b60405180910390a25050505050505050565b600054600160a81b900460ff1615620008095760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b34806000036200085c5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b336001600160a01b03167f47705cc9a85c5f679e1f4e8e7fbd459b8267bc61fa3111ced6fe84f71d7d889e8b8b8b8b348c8c8c8c8c604051620008a99a9998979695949392919062003ffb565b60405180910390a250505050505050505050565b600054600160a81b900460ff1615620009085760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b81806000036200095b5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b620009726001600160a01b03831633308662002993565b60408051858152602081018590526001600160a01b0384168183015290517f521975b77c7879e0f2a2ffca11f89c90bf9202dd4336fd5e1178fb744c6d1e2d9181900360600190a150505050565b600054600160a81b900460ff161562000a0b5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b604051859062000a2f906315d2de4560e11b90879087908790879060200162004155565b6040516020818303038152906040528051906020012062000a586000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162000a879291906200419b565b600060405180830381600087803b15801562000aa257600080fd5b505af115801562000ab7573d6000803e3d6000fd5b5050505062000ac7868662002a00565b62000ad3848462002ade565b50505050505050565b600062000ae862002b79565b905090565b816001600160a01b03811662000b465760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6040805163448cfc8560e01b60208201526001600160a01b03851691810191909152821515606082015284906080016040516020818303038152906040528051906020012062000b9e6000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162000bcd9291906200419b565b600060405180830381600087803b15801562000be857600080fd5b505af115801562000bfd573d6000803e3d6000fd5b505050506000856001600160a01b03163b1162000c1957600080fd5b62000c25858562002bc4565b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387169081179091556040519081527fd18040e514983d65f088430e69091aea9bf07feaed3696a3faac1ccc34b5e3bc9060200160405180910390a1505050505050565b600054600160a81b900460ff161562000ce15760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b604051859062000d05906349710b1b60e01b9087908790879087906020016200430c565b6040516020818303038152906040528051906020012062000d2e6000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162000d5d9291906200419b565b600060405180830381600087803b15801562000d7857600080fd5b505af115801562000d8d573d6000803e3d6000fd5b5060009250505060408701351562000e855773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee62000dc3602089018962004353565b6001600160a01b03160362000dde5750604086013562000e85565b62000ded602088018862004353565b6001600160a01b031663095ea7b362000e0d60408a0160208b0162004353565b604080516001600160e01b031960e085901b1681526001600160a01b0390921660048301528a013560248201526044016020604051808303816000875af115801562000e5d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e83919062004373565b505b603f62000e9561753086620043a9565b62000ea2906040620043c5565b62000eae9190620043df565b5a101562000eff5760405162461bcd60e51b815260206004820152601760248201527f5661756c743a20696e73756666696369656e7420676173000000000000000000604482015260640162000609565b60008062000f1460408a0160208b0162004353565b6001600160a01b03166175305a62000f2d919062004402565b8463c696371a60e01b8b8b8e600001602081019062000f4d919062004353565b8f6040013560405160240162000f67949392919062004418565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000fa791906200444a565b600060405180830381858888f193505050503d806000811462000fe7576040519150601f19603f3d011682016040523d82523d6000602084013e62000fec565b606091505b5091509150816200115a576000896040013511801562001037575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6200102b60208b018b62004353565b6001600160a01b031614155b15620010e2576200104c60208a018a62004353565b6001600160a01b031663095ea7b36200106c60408c0160208d0162004353565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152600060248201526044016020604051808303816000875af1158015620010ba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010e0919062004373565b505b620010f160208a018a62004353565b6001600160a01b03166200110c60408b0160208c0162004353565b6001600160a01b03167f15fe0355a655dcccafef64364dff99adb73fad83d9549ce53673f2bdc2485fd68b60400135846040516200114c92919062004468565b60405180910390a362001183565b60006200116e60408b0160208c0162004353565b6001600160a01b03163b116200118357600080fd5b50505050505050505050565b600062000ae862002922565b600054600160a81b900460ff1615620011e65760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b620011f5602087018762004353565b6001600160a01b0381166200124d5760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6200125f604088016020890162004353565b6001600160a01b038116620012b75760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6040518990620012df906329498bc760e11b908b908b908b908b908b908b9060200162004483565b60405160208183030381529060405280519060200120620013086000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620013379291906200419b565b600060405180830381600087803b1580156200135257600080fd5b505af115801562001367573d6000803e3d6000fd5b505050506200137b8a8a8a8a8a8a62002ea1565b5050505050505050505050565b600054600160a81b900460ff1615620013d35760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b6040518790620013fb90632fc607cd60e11b9089908990899089908990899060200162004534565b60405160208183030381529060405280519060200120620014246000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620014539291906200419b565b600060405180830381600087803b1580156200146e57600080fd5b505af115801562001483573d6000803e3d6000fd5b5050505062001493888862002fb8565b6200149f868662002a00565b620014ab848462002ade565b505050505050505050565b600054600160a81b900460ff1615620015015760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b3480600003620015545760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b604080518381523460208201527f9b06bfc39a72bc50d04ef282cdb1245b6257232b83e90f935f007d2689d82611910160405180910390a15050565b6200159a62002922565b6001600160a01b0316336001600160a01b031614620015fc5760405162461bcd60e51b815260206004820152601860248201527f476f7665726e616e63653a206e6f7420676f7665726e6f720000000000000000604482015260640162000609565b600054600160a01b900460ff16620016635760405162461bcd60e51b815260206004820152602360248201527f476f7665726e616e63653a20636f6d6d756e69747920677561726420656e61626044820152621b195960ea1b606482015260840162000609565b600054600160a81b900460ff16620016be5760405162461bcd60e51b815260206004820152601960248201527f476f7665726e616e63653a206e6f742073757370656e64656400000000000000604482015260640162000609565b6203f480620016d56000546001600160a01b031690565b6001600160a01b03166353f0bb616040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001713573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001739919062004585565b62001745904262004402565b1015620017955760405162461bcd60e51b815260206004820152601660248201527f5661756c743a206e6f7420656e6f7567682074696d6500000000000000000000604482015260640162000609565b600080546001600160a01b03166001600160a01b031663cd1b4d206040518163ffffffff1660e01b8152600401602060405180830381865afa158015620017e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200180691906200459f565b905060005b82811015620019705773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8484838181106200183e576200183e620045bf565b905060200201602081019062001855919062004353565b6001600160a01b0316036200188b576200188573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee83476200305d565b6200195b565b6200195b848483818110620018a457620018a4620045bf565b9050602002016020810190620018bb919062004353565b83868685818110620018d157620018d1620045bf565b9050602002016020810190620018e8919062004353565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156200192f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001955919062004585565b6200305d565b806200196781620045d5565b9150506200180b565b50505050565b600054600160a81b900460ff1615620019c15760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b6040518390620019e190633dc4262f60e11b9085908590602001620045f1565b6040516020818303038152906040528051906020012062001a0a6000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162001a399291906200419b565b600060405180830381600087803b15801562001a5457600080fd5b505af115801562001a69573d6000803e3d6000fd5b5050505062001a79848462002a00565b5050505050565b62001a8a62002b79565b6001600160a01b0316336001600160a01b03161462001aec5760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e616e63653a206e6f7420436f6d6d756e697479204b6579000000604482015260640162000609565b600054600160a01b900460ff1662001b535760405162461bcd60e51b815260206004820152602360248201527f476f7665726e616e63653a20636f6d6d756e69747920677561726420656e61626044820152621b195960ea1b606482015260840162000609565b6000805460ff60a01b191681556040519081527f057c4cb09f128960151f04372028154acda40272f16360154961672989b59bad90602001620006a6565b62001b9b62002b79565b6001600160a01b0316336001600160a01b03161462001bfd5760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e616e63653a206e6f7420436f6d6d756e697479204b6579000000604482015260640162000609565b600054600160a01b900460ff161562001c655760405162461bcd60e51b8152602060048201526024808201527f476f7665726e616e63653a20636f6d6d756e6974792067756172642064697361604482015263189b195960e21b606482015260840162000609565b6000805460ff60a01b1916600160a01b179055604051600181527f057c4cb09f128960151f04372028154acda40272f16360154961672989b59bad90602001620006a6565b600054600160a81b900460ff161562001cf55760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b62001d04602082018262004353565b6001600160a01b03811662001d5c5760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b62001d6e604083016020840162004353565b6001600160a01b03811662001dc65760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b82604001358060000362001e1d5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b604051859062001e3b90635933f3fb60e11b9087906020016200461f565b6040516020818303038152906040528051906020012062001e646000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162001e939291906200419b565b600060405180830381600087803b15801562001eae57600080fd5b505af115801562001ec3573d6000803e3d6000fd5b5073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee925062001eed915050602088018862004353565b6001600160a01b03160362001fbf57600062001f10604088016020890162004353565b6001600160a01b0316876040013560405160006040518083038185875af1925050503d806000811462001f60576040519150601f19603f3d011682016040523d82523d6000602084013e62001f65565b606091505b505090508062001fb85760405162461bcd60e51b815260206004820152601f60248201527f5661756c743a207472616e736665722066616c6c6261636b206661696c656400604482015260640162000609565b5062000ad3565b62000ad362001fd5604088016020890162004353565b604088013562001fe960208a018a62004353565b6001600160a01b031691906200326d565b600054600160a81b900460ff1615620020455760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b856001600160a01b0381166200209e5760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6040518890620020c69063b27588ef60e01b908a908a908a908a908a908a906020016200463f565b60405160208183030381529060405280519060200120620020ef6000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b81526004016200211e9291906200419b565b600060405180830381600087803b1580156200213957600080fd5b505af11580156200214e573d6000803e3d6000fd5b5050604051622d029360ea1b81526001600160a01b038c16925063b40a4c00915062002187908b908b908b908b908b9060040162004694565b600060405180830381600087803b158015620021a257600080fd5b505af1158015620021b7573d6000803e3d6000fd5b5050505050505050505050505050565b600054600160a81b900460ff1615620022125760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b62002221602082018262004353565b6001600160a01b038116620022795760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6200228b604083016020840162004353565b6001600160a01b038116620022e35760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b8260400135806000036200233a5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b6040518590620023589063b554712f60e01b9087906020016200461f565b60405160208183030381529060405280519060200120620023816000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620023b09291906200419b565b600060405180830381600087803b158015620023cb57600080fd5b505af1158015620023e0573d6000803e3d6000fd5b5062000ad39250620023f9915050602088018862004353565b6200240b6040890160208a0162004353565b88604001356200305d565b600054600160a81b900460ff1615620024615760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b8280600003620024b45760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b620024cb6001600160a01b03861633308762002993565b336001600160a01b03167f030b52f4ea12be896482bc46f95fb31f1ac9457bc1a2a206981fbd18a69cc6e38c8c8c89898e8e8e8c8c604051620025189a99989796959493929190620046cb565b60405180910390a25050505050505050505050565b600054600160a81b900460ff1615620025785760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b6040518390620025989063cc5916d960e01b908590859060200162004740565b60405160208183030381529060405280519060200120620025c16000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620025f09291906200419b565b600060405180830381600087803b1580156200260b57600080fd5b505af115801562002620573d6000803e3d6000fd5b5050505062001a79848462002fb8565b600054600160a81b900460ff16156200267b5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b3480600003620026ce5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b336001600160a01b03167f6757034e841d88190e95fa8a7570ce6cb721257474400c3282ec536eab810540878787348888604051620027139695949392919062004765565b60405180910390a2505050505050565b600054600160a81b900460ff16156200276e5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b60405183906200278e90636faf6cf560e11b9085908590602001620047aa565b60405160208183030381529060405280519060200120620027b76000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620027e69291906200419b565b600060405180830381600087803b1580156200280157600080fd5b505af115801562002816573d6000803e3d6000fd5b5050505062001a79848462002ade565b6200283062002922565b6001600160a01b0316336001600160a01b031614620028925760405162461bcd60e51b815260206004820152601860248201527f476f7665726e616e63653a206e6f7420676f7665726e6f720000000000000000604482015260640162000609565b600054600160a81b900460ff1615620028dd5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b6000805460ff60a81b1916600160a81b179055604051600181527f58e6c20b68c19f4d8dbc6206267af40b288342464b433205bb41e5b65c4016da90602001620006a6565b600080546001600160a01b03166001600160a01b031663cd1b4d206040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200296d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ae891906200459f565b6040516001600160a01b0380851660248301528316604482015260648101829052620019709085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526200329f565b8060005b81811015620019705783838281811062002a225762002a22620045bf565b62002a3a926020604090920201908101915062004353565b6001600160a01b031663f109a0be85858481811062002a5d5762002a5d620045bf565b905060400201602001602081019062002a77919062004353565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b15801562002ab957600080fd5b505af115801562002ace573d6000803e3d6000fd5b5050505080600101905062002a04565b8060005b81811015620019705762002b7084848381811062002b045762002b04620045bf565b62002b1c926020606090920201908101915062004353565b85858481811062002b315762002b31620045bf565b905060600201602001602081019062002b4b919062004353565b86868581811062002b605762002b60620045bf565b905060600201604001356200305d565b60010162002ae2565b600080546001600160a01b03166001600160a01b0316633f87b30f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200296d573d6000803e3d6000fd5b6000826001600160a01b031663cd1b4d206040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002c05573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002c2b91906200459f565b90506000836001600160a01b0316633f87b30f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002c6e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002c9491906200459f565b90506000846001600160a01b03166353f0bb616040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002cd7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002cfd919062004585565b90508362002e765762002d0f62002922565b6001600160a01b0316836001600160a01b031614801562002d4a575062002d3562002b79565b6001600160a01b0316826001600160a01b0316145b62002d5457600080fd5b6000856001600160a01b031663d5b9c0366040518163ffffffff1660e01b81526004016040805180830381865afa15801562002d94573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002dba9190620047cf565b9050600062002dd16000546001600160a01b031690565b6001600160a01b031663d5b9c0366040518163ffffffff1660e01b81526004016040805180830381865afa15801562002e0e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002e349190620047cf565b8051835191925014801562002e565750806020015160ff16826020015160ff16145b62002e6057600080fd5b4283111562002e6e57600080fd5b505062001a79565b6001600160a01b0383161580159062002e9757506001600160a01b03821615155b62001a7957600080fd5b600060408701351562002f175773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee62002ed2602089018962004353565b6001600160a01b03160362002eed5750604086013562002f17565b62002f1762002f036040890160208a0162004353565b604089013562001fe960208b018b62004353565b62002f29604088016020890162004353565b6001600160a01b0316634904ac5f8288888888888e600001602081019062002f52919062004353565b8f604001356040518963ffffffff1660e01b815260040162002f7b979695949392919062004830565b6000604051808303818588803b15801562002f9557600080fd5b505af115801562002faa573d6000803e3d6000fd5b505050505050505050505050565b8060005b81811015620019705783838281811062002fda5762002fda620045bf565b9050604002016000013584848381811062002ff95762002ff9620045bf565b905060400201602001602081019062003013919062004353565b604051620030219062003549565b6001600160a01b0390911681526020018190604051809103906000f590508015801562003052573d6000803e3d6000fd5b505060010162002fbc565b7fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b038416016200313a576000826001600160a01b0316611f4083604051600060405180830381858888f193505050503d8060008114620030e1576040519150601f19603f3d011682016040523d82523d6000602084013e620030e6565b606091505b50509050806200197057826001600160a01b03167f2c024f929e1e2dec521388b8607f880d3bb3165478e3c80b1a4c280e0130d981836040516200312c91815260200190565b60405180910390a250505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916200319891906200444a565b6000604051808303816000865af19150503d8060008114620031d7576040519150601f19603f3d011682016040523d82523d6000602084013e620031dc565b606091505b509150915060008280156200320c5750815115806200320c5750818060200190518101906200320c919062004373565b9050806200326457856001600160a01b0316856001600160a01b03167f158555118e14c8fb6d2e41d2bf4c3c75c8bcab740492ca50f44458a2bd02171586856040516200325b92919062004468565b60405180910390a35b5050505b505050565b6040516001600160a01b0383166024820152604481018290526200326890849063a9059cbb60e01b90606401620029c8565b6000620032f6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200338b9092919063ffffffff16565b80519091501562003268578080602001905181019062003317919062004373565b620032685760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162000609565b60606200339c8484600085620033a6565b90505b9392505050565b606082471015620034205760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840162000609565b600080866001600160a01b031685876040516200343e91906200444a565b60006040518083038185875af1925050503d80600081146200347d576040519150601f19603f3d011682016040523d82523d6000602084013e62003482565b606091505b50915091506200349587838387620034a2565b925050505b949350505050565b60608315620035165782516000036200350e576001600160a01b0385163b6200350e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000609565b50816200349a565b6200349a83838151156200352d5781518083602001fd5b8060405162461bcd60e51b815260040162000609919062004887565b61045a806200489d83390190565b803563ffffffff811681146200356c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200359957600080fd5b813567ffffffffffffffff80821115620035b757620035b762003571565b604051601f8301601f19908116603f01168101908282118183101715620035e257620035e262003571565b81604052838152866020858801011115620035fc57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6001600160a01b03811681146200363257600080fd5b50565b80356200356c816200361c565b60008083601f8401126200365557600080fd5b50813567ffffffffffffffff8111156200366e57600080fd5b6020830191508360208285010111156200368757600080fd5b9250929050565b600080600080600080600060c0888a031215620036aa57600080fd5b620036b58862003557565b9650602088013567ffffffffffffffff80821115620036d357600080fd5b620036e18b838c0162003587565b9750620036f160408b0162003557565b965060608a0135915062003705826200361c565b9094506080890135935060a089013590808211156200372357600080fd5b50620037328a828b0162003642565b989b979a50959850939692959293505050565b600080600080600080600080600060c08a8c0312156200376457600080fd5b6200376f8a62003557565b985060208a013567ffffffffffffffff808211156200378d57600080fd5b6200379b8d838e0162003642565b909a509850889150620037b160408d0162003557565b975060608c0135915080821115620037c857600080fd5b620037d68d838e0162003642565b909750955060808c0135945060a08c0135915080821115620037f757600080fd5b50620038068c828d0162003642565b915080935050809150509295985092959850929598565b6000806000606084860312156200383357600080fd5b833592506020840135915060408401356200384e816200361c565b809150509250925092565b6000606082840312156200386c57600080fd5b50919050565b60008083601f8401126200388557600080fd5b50813567ffffffffffffffff8111156200389e57600080fd5b6020830191508360208260061b85010111156200368757600080fd5b60008083601f840112620038cd57600080fd5b50813567ffffffffffffffff811115620038e657600080fd5b6020830191508360206060830285010111156200368757600080fd5b600080600080600060a086880312156200391b57600080fd5b62003927878762003859565b9450606086013567ffffffffffffffff808211156200394557600080fd5b6200395389838a0162003872565b909650945060808801359150808211156200396d57600080fd5b506200397c88828901620038ba565b969995985093965092949392505050565b80151581146200363257600080fd5b600080600060a08486031215620039b257600080fd5b620039be858562003859565b92506060840135620039d0816200361c565b915060808401356200384e816200398d565b60008083601f840112620039f557600080fd5b50813567ffffffffffffffff81111562003a0e57600080fd5b6020830191508360208260051b85010111156200368757600080fd5b6000806000806000610100868803121562003a4457600080fd5b62003a50878762003859565b945062003a61876060880162003859565b935060c086013567ffffffffffffffff81111562003a7e57600080fd5b62003a8c88828901620039e2565b96999598509660e00135949350505050565b6000806000806000806000610120888a03121562003abb57600080fd5b62003ac7898962003859565b965062003ad88960608a0162003859565b955062003ae860c0890162003557565b945060e088013567ffffffffffffffff8082111562003b0657600080fd5b62003b148b838c0162003642565b90965094506101008a01359150808211156200372357600080fd5b600080600080600080600060c0888a03121562003b4b57600080fd5b62003b57898962003859565b9650606088013567ffffffffffffffff8082111562003b7557600080fd5b62003b838b838c0162003872565b909850965060808a013591508082111562003b9d57600080fd5b62003bab8b838c0162003872565b909650945060a08a013591508082111562003bc557600080fd5b50620037328a828b01620038ba565b60006020828403121562003be757600080fd5b5035919050565b6000806020838503121562003c0257600080fd5b823567ffffffffffffffff81111562003c1a57600080fd5b62003c2885828601620039e2565b90969095509350505050565b60008060006080848603121562003c4a57600080fd5b62003c56858562003859565b9250606084013567ffffffffffffffff81111562003c7357600080fd5b62003c818682870162003872565b9497909650939450505050565b60008060c0838503121562003ca257600080fd5b62003cae848462003859565b915062003cbf846060850162003859565b90509250929050565b600080600080600080600060e0888a03121562003ce457600080fd5b62003cf0898962003859565b9650606088013562003d02816200361c565b955062003d126080890162003557565b945060a088013567ffffffffffffffff8082111562003d3057600080fd5b62003d3e8b838c0162003642565b909650945060c08a01359150808211156200372357600080fd5b6000806000806000806000806000806101008b8d03121562003d7957600080fd5b62003d848b62003557565b995060208b013567ffffffffffffffff8082111562003da257600080fd5b62003db08e838f0162003587565b9a5062003dc060408e0162003557565b995060608d013591508082111562003dd757600080fd5b62003de58e838f0162003642565b909950975060808d0135965087915062003e0260a08e0162003635565b955060c08d0135945060e08d013591508082111562003e2057600080fd5b5062003e2f8d828e0162003642565b915080935050809150509295989b9194979a5092959850565b60008060008060006080868803121562003e6157600080fd5b62003e6c8662003557565b9450602086013567ffffffffffffffff8082111562003e8a57600080fd5b62003e9889838a0162003587565b955062003ea86040890162003557565b9450606088013591508082111562003ebf57600080fd5b506200397c8882890162003642565b60008060006080848603121562003ee457600080fd5b62003ef0858562003859565b9250606084013567ffffffffffffffff81111562003f0d57600080fd5b62003c8186828701620038ba565b60005b8381101562003f3857818101518382015260200162003f1e565b50506000910152565b6000815180845262003f5b81602086016020860162003f1b565b601f01601f19169290920160200192915050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600063ffffffff808a16835260c0602084015262003fba60c084018a62003f41565b81891660408501526001600160a01b038816606085015286608085015283810360a085015262003fec81868862003f6f565b9b9a5050505050505050505050565b600063ffffffff808d16835260e060208401526200401e60e084018c8e62003f6f565b818b16604085015289606085015283810360808501526200404181898b62003f6f565b9150508560a084015282810360c08401526200405f81858762003f6f565b9d9c50505050505050505050505050565b8183526000602080850194508260005b85811015620040cc57813562004096816200361c565b6001600160a01b0390811688528284013590620040b3826200361c565b1687840152604096870196919091019060010162004080565b509495945050505050565b8035620040e4816200361c565b6001600160a01b03908116835260208201359062004102826200361c565b166020830152604090810135910152565b81835260208301925060008160005b848110156200414b57620041378683620040d7565b606095860195919091019060010162004122565b5093949350505050565b63ffffffff60e01b861681526060602082015260006200417a60608301868862004070565b82810360408401526200418f81858762004113565b98975050505050505050565b8235815260208084013590820152608081016040840135620041bd816200361c565b6001600160a01b03166040830152606090910191909152919050565b6000808335601e19843603018112620041f157600080fd5b830160208101925035905067ffffffffffffffff8111156200421257600080fd5b8036038213156200368757600080fd5b81835260006020808501808196508560051b810191508460005b87811015620042ff5782840389528135609e198836030181126200425f57600080fd5b870160a08135600481106200427357600080fd5b86526200428282880162003635565b6001600160a01b031687870152604082810135908701526060620042a981840184620041d9565b83838a0152620042bd848a01828462003f6f565b93505050506080620042d281840184620041d9565b935087830382890152620042e883858362003f6f565b9c89019c975050509286019250506001016200423c565b5091979650505050505050565b6001600160e01b031986168152620043286020820186620040d7565b60c0608082015260006200434160c08301858762004222565b90508260a08301529695505050505050565b6000602082840312156200436657600080fd5b81356200339f816200361c565b6000602082840312156200438657600080fd5b81516200339f816200398d565b634e487b7160e01b600052601160045260246000fd5b80820180821115620043bf57620043bf62004393565b92915050565b8082028115828204841417620043bf57620043bf62004393565b600082620043fd57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115620043bf57620043bf62004393565b6060815260006200442e60608301868862004222565b6001600160a01b03949094166020830152506040015292915050565b600082516200445e81846020870162003f1b565b9190910192915050565b8281526040602082015260006200339c604083018462003f41565b6001600160e01b0319881681526200449f6020820188620040d7565b63ffffffff8616608082015260e060a08201526000620044c460e08301868862003f6f565b82810360c0840152620044d981858762003f6f565b9a9950505050505050505050565b8183526000602080850194508260005b85811015620040cc57813587528282013562004513816200361c565b6001600160a01b0316878401526040968701969190910190600101620044f7565b63ffffffff60e01b881681526080602082015260006200455960808301888a620044e7565b82810360408401526200456e81878962004070565b90508281036060840152620044d981858762004113565b6000602082840312156200459857600080fd5b5051919050565b600060208284031215620045b257600080fd5b81516200339f816200361c565b634e487b7160e01b600052603260045260246000fd5b600060018201620045ea57620045ea62004393565b5060010190565b63ffffffff60e01b841681526040602082015260006200461660408301848662004070565b95945050505050565b6001600160e01b031983168152608081016200339f6020830184620040d7565b63ffffffff60e01b881681526001600160a01b038716602082015263ffffffff8616604082015260a0606082015260006200467f60a08301868862003f6f565b8281036080840152620044d981858762003f6f565b63ffffffff86168152606060208201526000620046b660608301868862003f6f565b82810360408401526200418f81858762003f6f565b600061010063ffffffff808e168452816020850152620046ee8285018e62003f41565b9150808c166040850152506001600160a01b038a16606084015288608084015282810360a08401526200472381888a62003f6f565b90508560c084015282810360e08401526200405f81858762003f6f565b63ffffffff60e01b8416815260406020820152600062004616604083018486620044e7565b600063ffffffff808916835260a060208401526200478760a084018962003f41565b81881660408501528660608501528381036080850152620044d981868862003f6f565b63ffffffff60e01b841681526040602082015260006200461660408301848662004113565b600060408284031215620047e257600080fd5b6040516040810181811067ffffffffffffffff8211171562004808576200480862003571565b60405282518152602083015160ff811681146200482457600080fd5b60208201529392505050565b63ffffffff8816815260a0602082015260006200485260a08301888a62003f6f565b82810360408401526200486781878962003f6f565b6001600160a01b0395909516606084015250506080015295945050505050565b6020815260006200339f602083018462003f4156fe60a060405234801561001057600080fd5b5060405161045a38038061045a83398101604081905261002f91610189565b336080526001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036100b257604051600090339047908381818185875af1925050503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50509050806100ac57600080fd5b50610183565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015610100573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061012491906101b9565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561016a57600080fd5b505af115801561017e573d6000803e3d6000fd5b505050505b506101d2565b60006020828403121561019b57600080fd5b81516001600160a01b03811681146101b257600080fd5b9392505050565b6000602082840312156101cb57600080fd5b5051919050565b6080516102686101f260003960008181602b015260d401526102686000f3fe6080604052600436106100225760003560e01c8063f109a0be146100ae57600080fd5b366100a95760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03164760405160006040518083038185875af1925050503d8060008114610094576040519150601f19603f3d011682016040523d82523d6000602084013e610099565b606091505b50509050806100a757600080fd5b005b600080fd5b3480156100ba57600080fd5b506100a76100c93660046101e9565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100fe57600080fd5b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa15801561014c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101709190610219565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156101ce57600080fd5b505af11580156101e2573d6000803e3d6000fd5b5050505050565b6000602082840312156101fb57600080fd5b81356001600160a01b038116811461021257600080fd5b9392505050565b60006020828403121561022b57600080fd5b505191905056fea26469706673582212207a3063a75755b8b3364bcf7137526722a9ac4adcc81866e63e0a9dfb44df3a3e64736f6c63430008140033476f7665726e616e63653a2073757370656e6465640000000000000000000000a26469706673582212206739deecc01f53b27676b9959103ba7360239c5fd53cfabbd1e68bf877b9542764736f6c63430008140033000000000000000000000000cd351d3626dc244730796a3168d315168ebf08be

Deployed Bytecode

0x608060405260043610620001d35760003560e01c80637161fb9111620000ff578063b27588ef1162000095578063cc5916d9116200006c578063cc5916d91462000529578063dd687345146200054e578063df5ed9ea1462000565578063e6400bbe146200058a57600080fd5b8063b27588ef14620004ba578063b554712f14620004df578063bbddc2fb146200050457600080fd5b80637b884c5e11620000d65780637b884c5e14620004405780638d95e5591462000465578063aae9ba43146200047d578063b267e7f6146200049557600080fd5b80637161fb9114620003e35780637484606f14620003fa578063765849b9146200041f57600080fd5b80633f87b30f11620001755780634b0cfc00116200014c5780634b0cfc0014620003615780634fc07d7514620003815780635293178e14620003995780635f8c0f9a14620003be57600080fd5b80633f87b30f14620002e6578063448cfc85146200031757806349710b1b146200033c57600080fd5b80632971198e11620001aa5780632971198e146200026b57806329b7420114620002905780632ba5bc8a14620002c157600080fd5b8063046f7da2146200021557806304fc7da0146200022f57806307933dd2146200025457600080fd5b36620002105760405134815233907fa5df10d7a7c736bd7231e790267747aebface82ad6ee778d26a4aa99eb1c2f7b9060200160405180910390a2005b600080fd5b3480156200022257600080fd5b506200022d620005a2565b005b3480156200023c57600080fd5b506200022d6200024e3660046200368e565b620006b0565b6200022d6200026536600462003745565b620007be565b3480156200027857600080fd5b506200022d6200028a3660046200381d565b620008bd565b3480156200029d57600080fd5b50600054600160a81b900460ff165b60405190151581526020015b60405180910390f35b348015620002ce57600080fd5b506200022d620002e036600462003902565b620009c0565b348015620002f357600080fd5b50620002fe62000adc565b6040516001600160a01b039091168152602001620002b8565b3480156200032457600080fd5b506200022d620003363660046200399c565b62000aed565b3480156200034957600080fd5b506200022d6200035b36600462003a2a565b62000c96565b3480156200036e57600080fd5b506000546001600160a01b0316620002fe565b3480156200038e57600080fd5b50620002fe6200118f565b348015620003a657600080fd5b506200022d620003b836600462003a9e565b6200119b565b348015620003cb57600080fd5b506200022d620003dd36600462003b2f565b62001388565b6200022d620003f436600462003bd4565b620014b6565b3480156200040757600080fd5b506200022d6200041936600462003bee565b62001590565b3480156200042c57600080fd5b50600054600160a01b900460ff16620002ac565b3480156200044d57600080fd5b506200022d6200045f36600462003c34565b62001976565b3480156200047257600080fd5b506200022d62001a80565b3480156200048a57600080fd5b506200022d62001b91565b348015620004a257600080fd5b506200022d620004b436600462003c8e565b62001caa565b348015620004c757600080fd5b506200022d620004d936600462003cc8565b62001ffa565b348015620004ec57600080fd5b506200022d620004fe36600462003c8e565b620021c7565b3480156200051157600080fd5b506200022d6200052336600462003d58565b62002416565b3480156200053657600080fd5b506200022d6200054836600462003c34565b6200252d565b6200022d6200055f36600462003e48565b62002630565b3480156200057257600080fd5b506200022d6200058436600462003ece565b62002723565b3480156200059757600080fd5b506200022d62002826565b620005ac62002922565b6001600160a01b0316336001600160a01b031614620006125760405162461bcd60e51b815260206004820152601860248201527f476f7665726e616e63653a206e6f7420676f7665726e6f72000000000000000060448201526064015b60405180910390fd5b600054600160a81b900460ff166200066d5760405162461bcd60e51b815260206004820152601960248201527f476f7665726e616e63653a206e6f742073757370656e64656400000000000000604482015260640162000609565b6000805460ff60a81b191681556040519081527f58e6c20b68c19f4d8dbc6206267af40b288342464b433205bb41e5b65c4016da906020015b60405180910390a1565b600054600160a81b900460ff1615620006fb5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b82806000036200074e5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b620007656001600160a01b03861633308762002993565b336001600160a01b03167f834b524d9f8ccbd31b00b671c896697b96eb4398c0f56e9386a21f5df61e3ce389898989898989604051620007ac979695949392919062003f98565b60405180910390a25050505050505050565b600054600160a81b900460ff1615620008095760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b34806000036200085c5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b336001600160a01b03167f47705cc9a85c5f679e1f4e8e7fbd459b8267bc61fa3111ced6fe84f71d7d889e8b8b8b8b348c8c8c8c8c604051620008a99a9998979695949392919062003ffb565b60405180910390a250505050505050505050565b600054600160a81b900460ff1615620009085760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b81806000036200095b5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b620009726001600160a01b03831633308662002993565b60408051858152602081018590526001600160a01b0384168183015290517f521975b77c7879e0f2a2ffca11f89c90bf9202dd4336fd5e1178fb744c6d1e2d9181900360600190a150505050565b600054600160a81b900460ff161562000a0b5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b604051859062000a2f906315d2de4560e11b90879087908790879060200162004155565b6040516020818303038152906040528051906020012062000a586000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162000a879291906200419b565b600060405180830381600087803b15801562000aa257600080fd5b505af115801562000ab7573d6000803e3d6000fd5b5050505062000ac7868662002a00565b62000ad3848462002ade565b50505050505050565b600062000ae862002b79565b905090565b816001600160a01b03811662000b465760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6040805163448cfc8560e01b60208201526001600160a01b03851691810191909152821515606082015284906080016040516020818303038152906040528051906020012062000b9e6000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162000bcd9291906200419b565b600060405180830381600087803b15801562000be857600080fd5b505af115801562000bfd573d6000803e3d6000fd5b505050506000856001600160a01b03163b1162000c1957600080fd5b62000c25858562002bc4565b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387169081179091556040519081527fd18040e514983d65f088430e69091aea9bf07feaed3696a3faac1ccc34b5e3bc9060200160405180910390a1505050505050565b600054600160a81b900460ff161562000ce15760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b604051859062000d05906349710b1b60e01b9087908790879087906020016200430c565b6040516020818303038152906040528051906020012062000d2e6000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162000d5d9291906200419b565b600060405180830381600087803b15801562000d7857600080fd5b505af115801562000d8d573d6000803e3d6000fd5b5060009250505060408701351562000e855773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee62000dc3602089018962004353565b6001600160a01b03160362000dde5750604086013562000e85565b62000ded602088018862004353565b6001600160a01b031663095ea7b362000e0d60408a0160208b0162004353565b604080516001600160e01b031960e085901b1681526001600160a01b0390921660048301528a013560248201526044016020604051808303816000875af115801562000e5d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e83919062004373565b505b603f62000e9561753086620043a9565b62000ea2906040620043c5565b62000eae9190620043df565b5a101562000eff5760405162461bcd60e51b815260206004820152601760248201527f5661756c743a20696e73756666696369656e7420676173000000000000000000604482015260640162000609565b60008062000f1460408a0160208b0162004353565b6001600160a01b03166175305a62000f2d919062004402565b8463c696371a60e01b8b8b8e600001602081019062000f4d919062004353565b8f6040013560405160240162000f67949392919062004418565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000fa791906200444a565b600060405180830381858888f193505050503d806000811462000fe7576040519150601f19603f3d011682016040523d82523d6000602084013e62000fec565b606091505b5091509150816200115a576000896040013511801562001037575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6200102b60208b018b62004353565b6001600160a01b031614155b15620010e2576200104c60208a018a62004353565b6001600160a01b031663095ea7b36200106c60408c0160208d0162004353565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152600060248201526044016020604051808303816000875af1158015620010ba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010e0919062004373565b505b620010f160208a018a62004353565b6001600160a01b03166200110c60408b0160208c0162004353565b6001600160a01b03167f15fe0355a655dcccafef64364dff99adb73fad83d9549ce53673f2bdc2485fd68b60400135846040516200114c92919062004468565b60405180910390a362001183565b60006200116e60408b0160208c0162004353565b6001600160a01b03163b116200118357600080fd5b50505050505050505050565b600062000ae862002922565b600054600160a81b900460ff1615620011e65760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b620011f5602087018762004353565b6001600160a01b0381166200124d5760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6200125f604088016020890162004353565b6001600160a01b038116620012b75760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6040518990620012df906329498bc760e11b908b908b908b908b908b908b9060200162004483565b60405160208183030381529060405280519060200120620013086000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620013379291906200419b565b600060405180830381600087803b1580156200135257600080fd5b505af115801562001367573d6000803e3d6000fd5b505050506200137b8a8a8a8a8a8a62002ea1565b5050505050505050505050565b600054600160a81b900460ff1615620013d35760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b6040518790620013fb90632fc607cd60e11b9089908990899089908990899060200162004534565b60405160208183030381529060405280519060200120620014246000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620014539291906200419b565b600060405180830381600087803b1580156200146e57600080fd5b505af115801562001483573d6000803e3d6000fd5b5050505062001493888862002fb8565b6200149f868662002a00565b620014ab848462002ade565b505050505050505050565b600054600160a81b900460ff1615620015015760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b3480600003620015545760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b604080518381523460208201527f9b06bfc39a72bc50d04ef282cdb1245b6257232b83e90f935f007d2689d82611910160405180910390a15050565b6200159a62002922565b6001600160a01b0316336001600160a01b031614620015fc5760405162461bcd60e51b815260206004820152601860248201527f476f7665726e616e63653a206e6f7420676f7665726e6f720000000000000000604482015260640162000609565b600054600160a01b900460ff16620016635760405162461bcd60e51b815260206004820152602360248201527f476f7665726e616e63653a20636f6d6d756e69747920677561726420656e61626044820152621b195960ea1b606482015260840162000609565b600054600160a81b900460ff16620016be5760405162461bcd60e51b815260206004820152601960248201527f476f7665726e616e63653a206e6f742073757370656e64656400000000000000604482015260640162000609565b6203f480620016d56000546001600160a01b031690565b6001600160a01b03166353f0bb616040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001713573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001739919062004585565b62001745904262004402565b1015620017955760405162461bcd60e51b815260206004820152601660248201527f5661756c743a206e6f7420656e6f7567682074696d6500000000000000000000604482015260640162000609565b600080546001600160a01b03166001600160a01b031663cd1b4d206040518163ffffffff1660e01b8152600401602060405180830381865afa158015620017e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200180691906200459f565b905060005b82811015620019705773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8484838181106200183e576200183e620045bf565b905060200201602081019062001855919062004353565b6001600160a01b0316036200188b576200188573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee83476200305d565b6200195b565b6200195b848483818110620018a457620018a4620045bf565b9050602002016020810190620018bb919062004353565b83868685818110620018d157620018d1620045bf565b9050602002016020810190620018e8919062004353565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156200192f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001955919062004585565b6200305d565b806200196781620045d5565b9150506200180b565b50505050565b600054600160a81b900460ff1615620019c15760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b6040518390620019e190633dc4262f60e11b9085908590602001620045f1565b6040516020818303038152906040528051906020012062001a0a6000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162001a399291906200419b565b600060405180830381600087803b15801562001a5457600080fd5b505af115801562001a69573d6000803e3d6000fd5b5050505062001a79848462002a00565b5050505050565b62001a8a62002b79565b6001600160a01b0316336001600160a01b03161462001aec5760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e616e63653a206e6f7420436f6d6d756e697479204b6579000000604482015260640162000609565b600054600160a01b900460ff1662001b535760405162461bcd60e51b815260206004820152602360248201527f476f7665726e616e63653a20636f6d6d756e69747920677561726420656e61626044820152621b195960ea1b606482015260840162000609565b6000805460ff60a01b191681556040519081527f057c4cb09f128960151f04372028154acda40272f16360154961672989b59bad90602001620006a6565b62001b9b62002b79565b6001600160a01b0316336001600160a01b03161462001bfd5760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e616e63653a206e6f7420436f6d6d756e697479204b6579000000604482015260640162000609565b600054600160a01b900460ff161562001c655760405162461bcd60e51b8152602060048201526024808201527f476f7665726e616e63653a20636f6d6d756e6974792067756172642064697361604482015263189b195960e21b606482015260840162000609565b6000805460ff60a01b1916600160a01b179055604051600181527f057c4cb09f128960151f04372028154acda40272f16360154961672989b59bad90602001620006a6565b600054600160a81b900460ff161562001cf55760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b62001d04602082018262004353565b6001600160a01b03811662001d5c5760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b62001d6e604083016020840162004353565b6001600160a01b03811662001dc65760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b82604001358060000362001e1d5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b604051859062001e3b90635933f3fb60e11b9087906020016200461f565b6040516020818303038152906040528051906020012062001e646000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b815260040162001e939291906200419b565b600060405180830381600087803b15801562001eae57600080fd5b505af115801562001ec3573d6000803e3d6000fd5b5073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee925062001eed915050602088018862004353565b6001600160a01b03160362001fbf57600062001f10604088016020890162004353565b6001600160a01b0316876040013560405160006040518083038185875af1925050503d806000811462001f60576040519150601f19603f3d011682016040523d82523d6000602084013e62001f65565b606091505b505090508062001fb85760405162461bcd60e51b815260206004820152601f60248201527f5661756c743a207472616e736665722066616c6c6261636b206661696c656400604482015260640162000609565b5062000ad3565b62000ad362001fd5604088016020890162004353565b604088013562001fe960208a018a62004353565b6001600160a01b031691906200326d565b600054600160a81b900460ff1615620020455760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b856001600160a01b0381166200209e5760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6040518890620020c69063b27588ef60e01b908a908a908a908a908a908a906020016200463f565b60405160208183030381529060405280519060200120620020ef6000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b81526004016200211e9291906200419b565b600060405180830381600087803b1580156200213957600080fd5b505af11580156200214e573d6000803e3d6000fd5b5050604051622d029360ea1b81526001600160a01b038c16925063b40a4c00915062002187908b908b908b908b908b9060040162004694565b600060405180830381600087803b158015620021a257600080fd5b505af1158015620021b7573d6000803e3d6000fd5b5050505050505050505050505050565b600054600160a81b900460ff1615620022125760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b62002221602082018262004353565b6001600160a01b038116620022795760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b6200228b604083016020840162004353565b6001600160a01b038116620022e35760405162461bcd60e51b815260206004820152601e60248201527f5368617265643a206164647265737320696e70757420697320656d7074790000604482015260640162000609565b8260400135806000036200233a5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b6040518590620023589063b554712f60e01b9087906020016200461f565b60405160208183030381529060405280519060200120620023816000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620023b09291906200419b565b600060405180830381600087803b158015620023cb57600080fd5b505af1158015620023e0573d6000803e3d6000fd5b5062000ad39250620023f9915050602088018862004353565b6200240b6040890160208a0162004353565b88604001356200305d565b600054600160a81b900460ff1615620024615760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b8280600003620024b45760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b620024cb6001600160a01b03861633308762002993565b336001600160a01b03167f030b52f4ea12be896482bc46f95fb31f1ac9457bc1a2a206981fbd18a69cc6e38c8c8c89898e8e8e8c8c604051620025189a99989796959493929190620046cb565b60405180910390a25050505050505050505050565b600054600160a81b900460ff1615620025785760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b6040518390620025989063cc5916d960e01b908590859060200162004740565b60405160208183030381529060405280519060200120620025c16000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620025f09291906200419b565b600060405180830381600087803b1580156200260b57600080fd5b505af115801562002620573d6000803e3d6000fd5b5050505062001a79848462002fb8565b600054600160a81b900460ff16156200267b5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b3480600003620026ce5760405162461bcd60e51b815260206004820152601b60248201527f5368617265643a2075696e7420696e70757420697320656d7074790000000000604482015260640162000609565b336001600160a01b03167f6757034e841d88190e95fa8a7570ce6cb721257474400c3282ec536eab810540878787348888604051620027139695949392919062004765565b60405180910390a2505050505050565b600054600160a81b900460ff16156200276e5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b60405183906200278e90636faf6cf560e11b9085908590602001620047aa565b60405160208183030381529060405280519060200120620027b76000546001600160a01b031690565b6001600160a01b0316632cb2b86283836040518363ffffffff1660e01b8152600401620027e69291906200419b565b600060405180830381600087803b1580156200280157600080fd5b505af115801562002816573d6000803e3d6000fd5b5050505062001a79848462002ade565b6200283062002922565b6001600160a01b0316336001600160a01b031614620028925760405162461bcd60e51b815260206004820152601860248201527f476f7665726e616e63653a206e6f7420676f7665726e6f720000000000000000604482015260640162000609565b600054600160a81b900460ff1615620028dd5760405162461bcd60e51b8152602060048201526015602482015260008051602062004cf7833981519152604482015260640162000609565b6000805460ff60a81b1916600160a81b179055604051600181527f58e6c20b68c19f4d8dbc6206267af40b288342464b433205bb41e5b65c4016da90602001620006a6565b600080546001600160a01b03166001600160a01b031663cd1b4d206040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200296d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ae891906200459f565b6040516001600160a01b0380851660248301528316604482015260648101829052620019709085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526200329f565b8060005b81811015620019705783838281811062002a225762002a22620045bf565b62002a3a926020604090920201908101915062004353565b6001600160a01b031663f109a0be85858481811062002a5d5762002a5d620045bf565b905060400201602001602081019062002a77919062004353565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b15801562002ab957600080fd5b505af115801562002ace573d6000803e3d6000fd5b5050505080600101905062002a04565b8060005b81811015620019705762002b7084848381811062002b045762002b04620045bf565b62002b1c926020606090920201908101915062004353565b85858481811062002b315762002b31620045bf565b905060600201602001602081019062002b4b919062004353565b86868581811062002b605762002b60620045bf565b905060600201604001356200305d565b60010162002ae2565b600080546001600160a01b03166001600160a01b0316633f87b30f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200296d573d6000803e3d6000fd5b6000826001600160a01b031663cd1b4d206040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002c05573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002c2b91906200459f565b90506000836001600160a01b0316633f87b30f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002c6e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002c9491906200459f565b90506000846001600160a01b03166353f0bb616040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002cd7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002cfd919062004585565b90508362002e765762002d0f62002922565b6001600160a01b0316836001600160a01b031614801562002d4a575062002d3562002b79565b6001600160a01b0316826001600160a01b0316145b62002d5457600080fd5b6000856001600160a01b031663d5b9c0366040518163ffffffff1660e01b81526004016040805180830381865afa15801562002d94573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002dba9190620047cf565b9050600062002dd16000546001600160a01b031690565b6001600160a01b031663d5b9c0366040518163ffffffff1660e01b81526004016040805180830381865afa15801562002e0e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002e349190620047cf565b8051835191925014801562002e565750806020015160ff16826020015160ff16145b62002e6057600080fd5b4283111562002e6e57600080fd5b505062001a79565b6001600160a01b0383161580159062002e9757506001600160a01b03821615155b62001a7957600080fd5b600060408701351562002f175773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee62002ed2602089018962004353565b6001600160a01b03160362002eed5750604086013562002f17565b62002f1762002f036040890160208a0162004353565b604089013562001fe960208b018b62004353565b62002f29604088016020890162004353565b6001600160a01b0316634904ac5f8288888888888e600001602081019062002f52919062004353565b8f604001356040518963ffffffff1660e01b815260040162002f7b979695949392919062004830565b6000604051808303818588803b15801562002f9557600080fd5b505af115801562002faa573d6000803e3d6000fd5b505050505050505050505050565b8060005b81811015620019705783838281811062002fda5762002fda620045bf565b9050604002016000013584848381811062002ff95762002ff9620045bf565b905060400201602001602081019062003013919062004353565b604051620030219062003549565b6001600160a01b0390911681526020018190604051809103906000f590508015801562003052573d6000803e3d6000fd5b505060010162002fbc565b7fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b038416016200313a576000826001600160a01b0316611f4083604051600060405180830381858888f193505050503d8060008114620030e1576040519150601f19603f3d011682016040523d82523d6000602084013e620030e6565b606091505b50509050806200197057826001600160a01b03167f2c024f929e1e2dec521388b8607f880d3bb3165478e3c80b1a4c280e0130d981836040516200312c91815260200190565b60405180910390a250505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916200319891906200444a565b6000604051808303816000865af19150503d8060008114620031d7576040519150601f19603f3d011682016040523d82523d6000602084013e620031dc565b606091505b509150915060008280156200320c5750815115806200320c5750818060200190518101906200320c919062004373565b9050806200326457856001600160a01b0316856001600160a01b03167f158555118e14c8fb6d2e41d2bf4c3c75c8bcab740492ca50f44458a2bd02171586856040516200325b92919062004468565b60405180910390a35b5050505b505050565b6040516001600160a01b0383166024820152604481018290526200326890849063a9059cbb60e01b90606401620029c8565b6000620032f6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200338b9092919063ffffffff16565b80519091501562003268578080602001905181019062003317919062004373565b620032685760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162000609565b60606200339c8484600085620033a6565b90505b9392505050565b606082471015620034205760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840162000609565b600080866001600160a01b031685876040516200343e91906200444a565b60006040518083038185875af1925050503d80600081146200347d576040519150601f19603f3d011682016040523d82523d6000602084013e62003482565b606091505b50915091506200349587838387620034a2565b925050505b949350505050565b60608315620035165782516000036200350e576001600160a01b0385163b6200350e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000609565b50816200349a565b6200349a83838151156200352d5781518083602001fd5b8060405162461bcd60e51b815260040162000609919062004887565b61045a806200489d83390190565b803563ffffffff811681146200356c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200359957600080fd5b813567ffffffffffffffff80821115620035b757620035b762003571565b604051601f8301601f19908116603f01168101908282118183101715620035e257620035e262003571565b81604052838152866020858801011115620035fc57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6001600160a01b03811681146200363257600080fd5b50565b80356200356c816200361c565b60008083601f8401126200365557600080fd5b50813567ffffffffffffffff8111156200366e57600080fd5b6020830191508360208285010111156200368757600080fd5b9250929050565b600080600080600080600060c0888a031215620036aa57600080fd5b620036b58862003557565b9650602088013567ffffffffffffffff80821115620036d357600080fd5b620036e18b838c0162003587565b9750620036f160408b0162003557565b965060608a0135915062003705826200361c565b9094506080890135935060a089013590808211156200372357600080fd5b50620037328a828b0162003642565b989b979a50959850939692959293505050565b600080600080600080600080600060c08a8c0312156200376457600080fd5b6200376f8a62003557565b985060208a013567ffffffffffffffff808211156200378d57600080fd5b6200379b8d838e0162003642565b909a509850889150620037b160408d0162003557565b975060608c0135915080821115620037c857600080fd5b620037d68d838e0162003642565b909750955060808c0135945060a08c0135915080821115620037f757600080fd5b50620038068c828d0162003642565b915080935050809150509295985092959850929598565b6000806000606084860312156200383357600080fd5b833592506020840135915060408401356200384e816200361c565b809150509250925092565b6000606082840312156200386c57600080fd5b50919050565b60008083601f8401126200388557600080fd5b50813567ffffffffffffffff8111156200389e57600080fd5b6020830191508360208260061b85010111156200368757600080fd5b60008083601f840112620038cd57600080fd5b50813567ffffffffffffffff811115620038e657600080fd5b6020830191508360206060830285010111156200368757600080fd5b600080600080600060a086880312156200391b57600080fd5b62003927878762003859565b9450606086013567ffffffffffffffff808211156200394557600080fd5b6200395389838a0162003872565b909650945060808801359150808211156200396d57600080fd5b506200397c88828901620038ba565b969995985093965092949392505050565b80151581146200363257600080fd5b600080600060a08486031215620039b257600080fd5b620039be858562003859565b92506060840135620039d0816200361c565b915060808401356200384e816200398d565b60008083601f840112620039f557600080fd5b50813567ffffffffffffffff81111562003a0e57600080fd5b6020830191508360208260051b85010111156200368757600080fd5b6000806000806000610100868803121562003a4457600080fd5b62003a50878762003859565b945062003a61876060880162003859565b935060c086013567ffffffffffffffff81111562003a7e57600080fd5b62003a8c88828901620039e2565b96999598509660e00135949350505050565b6000806000806000806000610120888a03121562003abb57600080fd5b62003ac7898962003859565b965062003ad88960608a0162003859565b955062003ae860c0890162003557565b945060e088013567ffffffffffffffff8082111562003b0657600080fd5b62003b148b838c0162003642565b90965094506101008a01359150808211156200372357600080fd5b600080600080600080600060c0888a03121562003b4b57600080fd5b62003b57898962003859565b9650606088013567ffffffffffffffff8082111562003b7557600080fd5b62003b838b838c0162003872565b909850965060808a013591508082111562003b9d57600080fd5b62003bab8b838c0162003872565b909650945060a08a013591508082111562003bc557600080fd5b50620037328a828b01620038ba565b60006020828403121562003be757600080fd5b5035919050565b6000806020838503121562003c0257600080fd5b823567ffffffffffffffff81111562003c1a57600080fd5b62003c2885828601620039e2565b90969095509350505050565b60008060006080848603121562003c4a57600080fd5b62003c56858562003859565b9250606084013567ffffffffffffffff81111562003c7357600080fd5b62003c818682870162003872565b9497909650939450505050565b60008060c0838503121562003ca257600080fd5b62003cae848462003859565b915062003cbf846060850162003859565b90509250929050565b600080600080600080600060e0888a03121562003ce457600080fd5b62003cf0898962003859565b9650606088013562003d02816200361c565b955062003d126080890162003557565b945060a088013567ffffffffffffffff8082111562003d3057600080fd5b62003d3e8b838c0162003642565b909650945060c08a01359150808211156200372357600080fd5b6000806000806000806000806000806101008b8d03121562003d7957600080fd5b62003d848b62003557565b995060208b013567ffffffffffffffff8082111562003da257600080fd5b62003db08e838f0162003587565b9a5062003dc060408e0162003557565b995060608d013591508082111562003dd757600080fd5b62003de58e838f0162003642565b909950975060808d0135965087915062003e0260a08e0162003635565b955060c08d0135945060e08d013591508082111562003e2057600080fd5b5062003e2f8d828e0162003642565b915080935050809150509295989b9194979a5092959850565b60008060008060006080868803121562003e6157600080fd5b62003e6c8662003557565b9450602086013567ffffffffffffffff8082111562003e8a57600080fd5b62003e9889838a0162003587565b955062003ea86040890162003557565b9450606088013591508082111562003ebf57600080fd5b506200397c8882890162003642565b60008060006080848603121562003ee457600080fd5b62003ef0858562003859565b9250606084013567ffffffffffffffff81111562003f0d57600080fd5b62003c8186828701620038ba565b60005b8381101562003f3857818101518382015260200162003f1e565b50506000910152565b6000815180845262003f5b81602086016020860162003f1b565b601f01601f19169290920160200192915050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600063ffffffff808a16835260c0602084015262003fba60c084018a62003f41565b81891660408501526001600160a01b038816606085015286608085015283810360a085015262003fec81868862003f6f565b9b9a5050505050505050505050565b600063ffffffff808d16835260e060208401526200401e60e084018c8e62003f6f565b818b16604085015289606085015283810360808501526200404181898b62003f6f565b9150508560a084015282810360c08401526200405f81858762003f6f565b9d9c50505050505050505050505050565b8183526000602080850194508260005b85811015620040cc57813562004096816200361c565b6001600160a01b0390811688528284013590620040b3826200361c565b1687840152604096870196919091019060010162004080565b509495945050505050565b8035620040e4816200361c565b6001600160a01b03908116835260208201359062004102826200361c565b166020830152604090810135910152565b81835260208301925060008160005b848110156200414b57620041378683620040d7565b606095860195919091019060010162004122565b5093949350505050565b63ffffffff60e01b861681526060602082015260006200417a60608301868862004070565b82810360408401526200418f81858762004113565b98975050505050505050565b8235815260208084013590820152608081016040840135620041bd816200361c565b6001600160a01b03166040830152606090910191909152919050565b6000808335601e19843603018112620041f157600080fd5b830160208101925035905067ffffffffffffffff8111156200421257600080fd5b8036038213156200368757600080fd5b81835260006020808501808196508560051b810191508460005b87811015620042ff5782840389528135609e198836030181126200425f57600080fd5b870160a08135600481106200427357600080fd5b86526200428282880162003635565b6001600160a01b031687870152604082810135908701526060620042a981840184620041d9565b83838a0152620042bd848a01828462003f6f565b93505050506080620042d281840184620041d9565b935087830382890152620042e883858362003f6f565b9c89019c975050509286019250506001016200423c565b5091979650505050505050565b6001600160e01b031986168152620043286020820186620040d7565b60c0608082015260006200434160c08301858762004222565b90508260a08301529695505050505050565b6000602082840312156200436657600080fd5b81356200339f816200361c565b6000602082840312156200438657600080fd5b81516200339f816200398d565b634e487b7160e01b600052601160045260246000fd5b80820180821115620043bf57620043bf62004393565b92915050565b8082028115828204841417620043bf57620043bf62004393565b600082620043fd57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115620043bf57620043bf62004393565b6060815260006200442e60608301868862004222565b6001600160a01b03949094166020830152506040015292915050565b600082516200445e81846020870162003f1b565b9190910192915050565b8281526040602082015260006200339c604083018462003f41565b6001600160e01b0319881681526200449f6020820188620040d7565b63ffffffff8616608082015260e060a08201526000620044c460e08301868862003f6f565b82810360c0840152620044d981858762003f6f565b9a9950505050505050505050565b8183526000602080850194508260005b85811015620040cc57813587528282013562004513816200361c565b6001600160a01b0316878401526040968701969190910190600101620044f7565b63ffffffff60e01b881681526080602082015260006200455960808301888a620044e7565b82810360408401526200456e81878962004070565b90508281036060840152620044d981858762004113565b6000602082840312156200459857600080fd5b5051919050565b600060208284031215620045b257600080fd5b81516200339f816200361c565b634e487b7160e01b600052603260045260246000fd5b600060018201620045ea57620045ea62004393565b5060010190565b63ffffffff60e01b841681526040602082015260006200461660408301848662004070565b95945050505050565b6001600160e01b031983168152608081016200339f6020830184620040d7565b63ffffffff60e01b881681526001600160a01b038716602082015263ffffffff8616604082015260a0606082015260006200467f60a08301868862003f6f565b8281036080840152620044d981858762003f6f565b63ffffffff86168152606060208201526000620046b660608301868862003f6f565b82810360408401526200418f81858762003f6f565b600061010063ffffffff808e168452816020850152620046ee8285018e62003f41565b9150808c166040850152506001600160a01b038a16606084015288608084015282810360a08401526200472381888a62003f6f565b90508560c084015282810360e08401526200405f81858762003f6f565b63ffffffff60e01b8416815260406020820152600062004616604083018486620044e7565b600063ffffffff808916835260a060208401526200478760a084018962003f41565b81881660408501528660608501528381036080850152620044d981868862003f6f565b63ffffffff60e01b841681526040602082015260006200461660408301848662004113565b600060408284031215620047e257600080fd5b6040516040810181811067ffffffffffffffff8211171562004808576200480862003571565b60405282518152602083015160ff811681146200482457600080fd5b60208201529392505050565b63ffffffff8816815260a0602082015260006200485260a08301888a62003f6f565b82810360408401526200486781878962003f6f565b6001600160a01b0395909516606084015250506080015295945050505050565b6020815260006200339f602083018462003f4156fe60a060405234801561001057600080fd5b5060405161045a38038061045a83398101604081905261002f91610189565b336080526001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036100b257604051600090339047908381818185875af1925050503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50509050806100ac57600080fd5b50610183565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015610100573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061012491906101b9565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561016a57600080fd5b505af115801561017e573d6000803e3d6000fd5b505050505b506101d2565b60006020828403121561019b57600080fd5b81516001600160a01b03811681146101b257600080fd5b9392505050565b6000602082840312156101cb57600080fd5b5051919050565b6080516102686101f260003960008181602b015260d401526102686000f3fe6080604052600436106100225760003560e01c8063f109a0be146100ae57600080fd5b366100a95760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03164760405160006040518083038185875af1925050503d8060008114610094576040519150601f19603f3d011682016040523d82523d6000602084013e610099565b606091505b50509050806100a757600080fd5b005b600080fd5b3480156100ba57600080fd5b506100a76100c93660046101e9565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100fe57600080fd5b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa15801561014c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101709190610219565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156101ce57600080fd5b505af11580156101e2573d6000803e3d6000fd5b5050505050565b6000602082840312156101fb57600080fd5b81356001600160a01b038116811461021257600080fd5b9392505050565b60006020828403121561022b57600080fd5b505191905056fea26469706673582212207a3063a75755b8b3364bcf7137526722a9ac4adcc81866e63e0a9dfb44df3a3e64736f6c63430008140033476f7665726e616e63653a2073757370656e6465640000000000000000000000a26469706673582212206739deecc01f53b27676b9959103ba7360239c5fd53cfabbd1e68bf877b9542764736f6c63430008140033

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

000000000000000000000000cd351d3626Dc244730796A3168D315168eBf08Be

-----Decoded View---------------
Arg [0] : keyManager (address): 0xcd351d3626Dc244730796A3168D315168eBf08Be

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000cd351d3626Dc244730796A3168D315168eBf08Be


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.