ETH Price: $3,345.94 (+4.82%)

Contract

0x4a33c2421D5E0d10132CE5E0484eE1270A6aF4C6

Overview

ETH Balance

0.002366688466952456 ETH

ETH Value

$7.92 (@ $3,345.94/ETH)

Token Holdings

Transaction Hash
Method
Block
From
To
Value
Bridge Native1214659432024-06-16 9:37:4328 days ago1718530663IN
0x4a33c242...70A6aF4C6
0.007980067068518 ETH0.000000372810.00146378
Bridge Native1214349532024-06-15 16:24:4329 days ago1718468683IN
0x4a33c242...70A6aF4C6
0.01468309074178 ETH0.0000002439510.00090672
Bridge Native1211977402024-06-10 4:37:3735 days ago1717994257IN
0x4a33c242...70A6aF4C6
0.248319522397621 ETH0.0000149275710.0615057
Bridge Native1210730492024-06-07 7:21:1537 days ago1717744875IN
0x4a33c242...70A6aF4C6
0.042676668709706 ETH0.0000147347550.06056117
Bridge Native1210053232024-06-05 17:43:4339 days ago1717609423IN
0x4a33c242...70A6aF4C6
0.000704093779536 ETH0.0000149398560.06112578
Bridge Native1209583162024-06-04 15:36:4940 days ago1717515409IN
0x4a33c242...70A6aF4C6
0.042375243940963 ETH0.0000147685110.06065394
Bridge Native1207934552024-05-31 20:01:2744 days ago1717185687IN
0x4a33c242...70A6aF4C6
0.002374600450708 ETH0.0000007479250.00294291
Bridge Native1205940012024-05-27 5:12:5949 days ago1716786779IN
0x4a33c242...70A6aF4C6
0.003864506877009 ETH0.0000146258080.06020392
Bridge Native1204370972024-05-23 14:02:5152 days ago1716472971IN
0x4a33c242...70A6aF4C6
0.000405818744679 ETH0.000029228890.12149813
Bridge Native1203071162024-05-20 13:50:0955 days ago1716213009IN
0x4a33c242...70A6aF4C6
0.000405092892073 ETH0.0000077784440.03196795
Bridge Native1203005082024-05-20 10:09:5355 days ago1716199793IN
0x4a33c242...70A6aF4C6
0.017202940530148 ETH0.0000014081410.00572501
Bridge Native1201924712024-05-17 22:08:3958 days ago1715983719IN
0x4a33c242...70A6aF4C6
0.048905137261364 ETH0.0000012719840.00518491
Bridge Native1199557192024-05-12 10:36:5563 days ago1715510215IN
0x4a33c242...70A6aF4C6
0.015214283218592 ETH0.000015003860.0618537
Bridge Native1199067072024-05-11 7:23:1164 days ago1715412191IN
0x4a33c242...70A6aF4C6
0.110258222031005 ETH0.0000150109180.0618242
Bridge Native1198816362024-05-10 17:27:2965 days ago1715362049IN
0x4a33c242...70A6aF4C6
0.00522478550338 ETH0.0000149244520.06113956
Bridge Native1198752042024-05-10 13:53:0565 days ago1715349185IN
0x4a33c242...70A6aF4C6
0.000208527408928 ETH0.0000159722870.06122209
Renounce Manager...1198744372024-05-10 13:27:3165 days ago1715347651IN
0x4a33c242...70A6aF4C6
0 ETH0.0000025606290.06162557
Transfer Ownersh...1198744272024-05-10 13:27:1165 days ago1715347631IN
0x4a33c242...70A6aF4C6
0 ETH0.0000017749980.06111779
Set Manager1198744152024-05-10 13:26:4765 days ago1715347607IN
0x4a33c242...70A6aF4C6
0 ETH0.0000061391680.06228538
Set Peers1197876752024-05-08 13:15:2767 days ago1715174127IN
0x4a33c242...70A6aF4C6
0 ETH0.0000131500120.06197456
0x608060401197865852024-05-08 12:39:0767 days ago1715171947IN
 Create: InterportCCIPNativeBridge
0 ETH0.0001961256420.06219509

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
1217930722024-06-23 23:22:0121 days ago1719184921
0x4a33c242...70A6aF4C6
0.19 ETH
1217930722024-06-23 23:22:0121 days ago1719184921
0x4a33c242...70A6aF4C6
0.19 ETH
1216371062024-06-20 8:43:0924 days ago1718872989
0x4a33c242...70A6aF4C6
0.032 ETH
1216371062024-06-20 8:43:0924 days ago1718872989
0x4a33c242...70A6aF4C6
0.032 ETH
1215896962024-06-19 6:22:4925 days ago1718778169
0x4a33c242...70A6aF4C6
0.042 ETH
1215896962024-06-19 6:22:4925 days ago1718778169
0x4a33c242...70A6aF4C6
0.042 ETH
1215706712024-06-18 19:48:3926 days ago1718740119
0x4a33c242...70A6aF4C6
0.1 ETH
1215706712024-06-18 19:48:3926 days ago1718740119
0x4a33c242...70A6aF4C6
0.1 ETH
1215019302024-06-17 5:37:1728 days ago1718602637
0x4a33c242...70A6aF4C6
0.005 ETH
1215019302024-06-17 5:37:1728 days ago1718602637
0x4a33c242...70A6aF4C6
0.005 ETH
1214659432024-06-16 9:37:4328 days ago1718530663
0x4a33c242...70A6aF4C6
0.00003936 ETH
1214659432024-06-16 9:37:4328 days ago1718530663
0x4a33c242...70A6aF4C6
0.0078 ETH
1214349532024-06-15 16:24:4329 days ago1718468683
0x4a33c242...70A6aF4C6
0.00004267 ETH
1214349532024-06-15 16:24:4329 days ago1718468683
0x4a33c242...70A6aF4C6
0.0145 ETH
1213309302024-06-13 6:37:1731 days ago1718260637
0x4a33c242...70A6aF4C6
0.032 ETH
1213309302024-06-13 6:37:1731 days ago1718260637
0x4a33c242...70A6aF4C6
0.032 ETH
1211977402024-06-10 4:37:3735 days ago1717994257
0x4a33c242...70A6aF4C6
0.00018386 ETH
1211977402024-06-10 4:37:3735 days ago1717994257
0x4a33c242...70A6aF4C6
0.248 ETH
1211212202024-06-08 10:06:5736 days ago1717841217
0x4a33c242...70A6aF4C6
0.042 ETH
1211212202024-06-08 10:06:5736 days ago1717841217
0x4a33c242...70A6aF4C6
0.042 ETH
1210730492024-06-07 7:21:1537 days ago1717744875
0x4a33c242...70A6aF4C6
0.0000458 ETH
1210730492024-06-07 7:21:1537 days ago1717744875
0x4a33c242...70A6aF4C6
0.0425 ETH
1210053232024-06-05 17:43:4339 days ago1717609423
0x4a33c242...70A6aF4C6
0.00004947 ETH
1210053232024-06-05 17:43:4339 days ago1717609423
0x4a33c242...70A6aF4C6
0.0005239 ETH
1209583162024-06-04 15:36:4940 days ago1717515409
0x4a33c242...70A6aF4C6
0.00004354 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
InterportCCIPNativeBridge

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 25 : InterportCCIPNativeBridge.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { ReentrancyGuard } from '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import { IERC165 } from '@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol';
import { IAny2EVMMessageReceiver } from '@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IAny2EVMMessageReceiver.sol';
import { IWrappedNative } from '@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IWrappedNative.sol';
import { Client } from '@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol';
import { CrosschainPeerMixin } from '../../crosschain/mixins/CrosschainPeerMixin.sol';
import { InterportCCIPBridgeCore } from './core/InterportCCIPBridgeCore.sol';
import { TargetAppGasMixin } from '../../crosschain/mixins/TargetAppGasMixin.sol';
import '../../helpers/TransferHelper.sol' as TransferHelper;
import '../../DataStructures.sol' as DataStructures;

/**
 * @title InterportCCIPNativeBridge
 * @notice The contract bridges the native network currency (regular and wrapped tokens) with Chainlink CCIP
 */
contract InterportCCIPNativeBridge is
    InterportCCIPBridgeCore,
    CrosschainPeerMixin,
    TargetAppGasMixin,
    ReentrancyGuard,
    IAny2EVMMessageReceiver,
    IERC165
{
    /**
     * @notice The "bridgeNative" action parameters
     * @param targetChainId The message target chain ID (EVM)
     * @param targetRecipient The address of the recipient on the target chain
     * @param amount The token amount
     * @param targetAppGas The target app execution gas
     */
    struct NativeBridgeAction {
        uint256 targetChainId;
        address targetRecipient;
        uint256 amount;
        uint256 targetAppGas;
    }

    /**
     * @notice The "bridgeNative" conversion flag structure
     * @param fromWrapped The source chain token conversion flag
     * @param toWrapped The target chain token conversion flag
     */
    struct NativeBridgeFlags {
        bool fromWrapped;
        bool toWrapped;
    }

    /**
     * @notice Cross-chain message data structure
     * @param actionId The unique identifier of the cross-chain action
     * @param sourceSender The address of the sender on the source chain
     * @param toWrapped The target chain token conversion flag
     * @param targetRecipient The address of the recipient on the target chain
     */
    struct NativeBridgeMessage {
        uint256 actionId;
        address sourceSender;
        bool toWrapped;
        address targetRecipient;
    }

    /**
     * @dev The native transfer gas limit
     */
    uint256 public nativeTransferGasLimit;

    uint256 private lastActionId = block.chainid * 1e10 + 55555 ** 2;

    /**
     * @notice Native bridge action source event
     * @param actionId The ID of the action
     * @param targetChainId The ID of the target chain
     * @param sourceSender The address of the user on the source chain
     * @param targetRecipient The address of the recipient on the target chain
     * @param fromWrapped The source chain token conversion flag
     * @param toWrapped The target chain token conversion flag
     * @param amount The amount of the asset used for the action
     * @param reserve The reserve amount
     * @param ccipMessageId The CCIP message ID
     * @param timestamp The timestamp of the action (in seconds)
     */
    event NativeBridgeActionSource(
        uint256 indexed actionId,
        uint256 targetChainId,
        address indexed sourceSender,
        address targetRecipient,
        bool fromWrapped,
        bool toWrapped,
        uint256 amount,
        uint256 reserve,
        bytes32 indexed ccipMessageId,
        uint256 timestamp
    );

    /**
     * @notice Native bridge action target event
     * @param actionId The ID of the action
     * @param sourceChainId The ID of the source chain
     * @param toWrapped The target chain token conversion flag
     * @param defaultWrapped The default conversion flag
     * @param timestamp The timestamp of the action (in seconds)
     */
    event NativeBridgeActionTarget(
        uint256 indexed actionId,
        uint256 indexed sourceChainId,
        bool toWrapped,
        bool defaultWrapped,
        uint256 timestamp
    );

    /**
     * @notice Emitted when the target chain app is paused
     */
    event TargetPausedFailure();

    /**
     * @notice Emitted when the message source address does not match the registered peer app on the target chain
     * @param sourceChainId The ID of the message source chain
     * @param fromAddress The address of the message source
     */
    event TargetFromAddressFailure(uint256 indexed sourceChainId, address indexed fromAddress);

    /**
     * @notice Emitted when the message token list is not valid
     */
    event TargetTokenListFailure();

    /**
     * @notice Emitted when the native transfer gas limit is set
     * @param nativeTransferGasLimit The native transfer gas limit
     */
    event SetNativeTransferGasLimit(uint256 nativeTransferGasLimit);

    /**
     * @notice Initializes the contract
     * @param _endpointAddress The cross-chain endpoint address
     * @param _chainIdPairs The correspondence between standard EVM chain IDs and CCIP chain selectors
     * @param _minTargetAppGasDefault The default value of minimum target app gas
     * @param _minTargetAppGasCustomData The custom values of minimum target app gas by standard chain IDs
     * @param _nativeTransferGasLimit The gas limit for the native transfer
     * @param _owner The address of the initial owner of the contract
     * @param _managers The addresses of initial managers of the contract
     * @param _addOwnerToManagers The flag to optionally add the owner to the list of managers
     */
    constructor(
        address _endpointAddress,
        ChainIdPair[] memory _chainIdPairs,
        uint256 _minTargetAppGasDefault,
        DataStructures.KeyToValue[] memory _minTargetAppGasCustomData,
        uint256 _nativeTransferGasLimit,
        address _owner,
        address[] memory _managers,
        bool _addOwnerToManagers
    )
        InterportCCIPBridgeCore(
            _endpointAddress,
            _chainIdPairs,
            _owner,
            _managers,
            _addOwnerToManagers
        )
        TargetAppGasMixin(_minTargetAppGasDefault, _minTargetAppGasCustomData)
    {
        _setNativeTransferGasLimit(_nativeTransferGasLimit);
    }

    /**
     * @notice Cross-chain bridging of the native token (both regular and wrapped)
     * @param _action The action parameters
     * @param _flags The action flags
     * @param _ccipSendValue The CCIP processing value
     */
    function bridgeNative(
        NativeBridgeAction calldata _action,
        NativeBridgeFlags calldata _flags,
        uint256 _ccipSendValue
    )
        external
        payable
        whenNotPaused
        nonReentrant
        returns (uint256 actionId, bytes32 ccipMessageId)
    {
        uint64 targetCcipChainId = _checkChainId(_action.targetChainId);
        address peerAddress = _checkPeerAddress(_action.targetChainId);

        _checkTargetAppGas(_action.targetChainId, _action.targetAppGas);

        lastActionId++;
        actionId = lastActionId;

        address wrappedNativeToken = _getWrappedNative();

        if (_flags.fromWrapped) {
            TransferHelper.safeTransferFrom(
                wrappedNativeToken,
                msg.sender,
                address(this),
                _action.amount
            );
        } else {
            IWrappedNative(wrappedNativeToken).deposit{ value: _action.amount }();
        }

        TransferHelper.safeApprove(wrappedNativeToken, endpoint, _action.amount);

        {
            bytes memory bridgeMessageData = abi.encode(
                NativeBridgeMessage({
                    actionId: actionId,
                    sourceSender: msg.sender,
                    toWrapped: _flags.toWrapped,
                    targetRecipient: _action.targetRecipient == address(0)
                        ? msg.sender
                        : _action.targetRecipient
                })
            );

            // Create an EVM2AnyMessage struct in memory with necessary information for sending a cross-chain message
            Client.EVM2AnyMessage memory ccipMessage = _createCcipMessage(
                peerAddress,
                bridgeMessageData,
                _createTokenAmounts(wrappedNativeToken, _action.amount),
                _action.targetAppGas
            );

            // Send the message
            ccipMessageId = _ccipSend(targetCcipChainId, ccipMessage, _ccipSendValue);
        }

        TransferHelper.safeApprove(wrappedNativeToken, endpoint, 0);

        emit NativeBridgeActionSource(
            actionId,
            _action.targetChainId,
            msg.sender,
            _action.targetRecipient,
            _flags.fromWrapped,
            _flags.toWrapped,
            _action.amount,
            msg.value - _ccipSendValue,
            ccipMessageId,
            block.timestamp
        );
    }

    /**
     * @notice Receives cross-chain messages
     * @dev The function is called by the cross-chain endpoint
     * @param _message The structure containing the message data
     */
    function ccipReceive(
        Client.Any2EVMMessage calldata _message
    ) external override nonReentrant onlyEndpoint {
        if (paused()) {
            emit TargetPausedFailure();

            return;
        }

        uint256 sourceStandardChainId = ccipToStandardChainId[_message.sourceChainSelector];

        address fromAddress = abi.decode(_message.sender, (address));

        bool condition = sourceStandardChainId != 0 &&
            fromAddress != address(0) &&
            fromAddress == peerMap[sourceStandardChainId];

        if (!condition) {
            emit TargetFromAddressFailure(sourceStandardChainId, fromAddress);

            return;
        }

        address wrappedNativeToken = _getWrappedNative();

        if (
            _message.destTokenAmounts.length != 1 ||
            _message.destTokenAmounts[0].token != wrappedNativeToken
        ) {
            emit TargetTokenListFailure();

            return;
        }

        NativeBridgeMessage memory bridgeMessage = abi.decode(_message.data, (NativeBridgeMessage));

        uint256 tokenAmount = _message.destTokenAmounts[0].amount;

        bool defaultWrapped;

        if (bridgeMessage.toWrapped) {
            TransferHelper.safeTransfer(
                wrappedNativeToken,
                bridgeMessage.targetRecipient,
                tokenAmount
            );
        } else {
            IWrappedNative(wrappedNativeToken).withdraw(tokenAmount);

            uint256 gasLimit = (nativeTransferGasLimit == 0)
                ? type(uint256).max
                : nativeTransferGasLimit;

            (bool success, ) = payable(bridgeMessage.targetRecipient).call{
                value: tokenAmount,
                gas: gasLimit
            }('');

            if (!success) {
                // Send WETH to the recipient address

                IWrappedNative(wrappedNativeToken).deposit{ value: tokenAmount }();

                TransferHelper.safeTransfer(
                    wrappedNativeToken,
                    bridgeMessage.targetRecipient,
                    tokenAmount
                );

                defaultWrapped = true;
            }
        }

        emit NativeBridgeActionTarget(
            bridgeMessage.actionId,
            sourceStandardChainId,
            bridgeMessage.toWrapped,
            defaultWrapped,
            block.timestamp
        );
    }

    /**
     * @notice Sets the native transfer gas limit
     * @param _nativeTransferGasLimit The native transfer gas limit
     */
    function setNativeTransferGasLimit(uint256 _nativeTransferGasLimit) external onlyManager {
        _setNativeTransferGasLimit(_nativeTransferGasLimit);
    }

    /**
     * @notice Cross-chain message fee estimation
     * @param _action The action parameters
     * @return Message fee
     */
    function messageFee(NativeBridgeAction calldata _action) external view returns (uint256) {
        uint64 targetCcipChainId = _checkChainId(_action.targetChainId);
        address peerAddress = _checkPeerAddress(_action.targetChainId);

        _checkTargetAppGas(_action.targetChainId, _action.targetAppGas);

        bytes memory bridgeMessageData = abi.encode(
            NativeBridgeMessage({
                actionId: lastActionId + 1, // estimate only
                sourceSender: msg.sender,
                toWrapped: true, // estimate only
                targetRecipient: _action.targetRecipient == address(0)
                    ? msg.sender
                    : _action.targetRecipient
            })
        );

        Client.EVM2AnyMessage memory ccipMessage = _createCcipMessage(
            peerAddress,
            bridgeMessageData,
            _createTokenAmounts(_getWrappedNative(), _action.amount),
            _action.targetAppGas
        );

        return _ccipGetFee(targetCcipChainId, ccipMessage);
    }

    /**
     * @notice The interface support query
     * @param _interfaceId The interface identifier (ERC-165)
     * @return The interface support flag
     */
    function supportsInterface(bytes4 _interfaceId) external pure override returns (bool) {
        return
            _interfaceId == type(IAny2EVMMessageReceiver).interfaceId ||
            _interfaceId == type(IERC165).interfaceId;
    }

    function _setNativeTransferGasLimit(uint256 _nativeTransferGasLimit) private {
        nativeTransferGasLimit = _nativeTransferGasLimit;

        emit SetNativeTransferGasLimit(_nativeTransferGasLimit);
    }

    function _getWrappedNative() private view returns (address) {
        return IEndpointWrappedNative(endpoint).getWrappedNative();
    }

    function _createTokenAmounts(
        address _wrappedNativeToken,
        uint256 _amount
    ) private pure returns (Client.EVMTokenAmount[] memory) {
        Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1);

        tokenAmounts[0] = Client.EVMTokenAmount({ token: _wrappedNativeToken, amount: _amount });

        return tokenAmounts;
    }
}

interface IEndpointWrappedNative {
    function getWrappedNative() external view returns (address);
}

File 2 of 25 : IAny2EVMMessageReceiver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Client} from "../libraries/Client.sol";

/// @notice Application contracts that intend to receive messages from
/// the router should implement this interface.
interface IAny2EVMMessageReceiver {
  /// @notice Called by the Router to deliver a message.
  /// If this reverts, any token transfers also revert. The message
  /// will move to a FAILED state and become available for manual execution.
  /// @param message CCIP Message
  /// @dev Note ensure you check the msg.sender is the OffRampRouter
  function ccipReceive(Client.Any2EVMMessage calldata message) external;
}

File 3 of 25 : IRouterClient.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Client} from "../libraries/Client.sol";

interface IRouterClient {
  error UnsupportedDestinationChain(uint64 destChainSelector);
  error InsufficientFeeTokenAmount();
  error InvalidMsgValue();

  /// @notice Checks if the given chain ID is supported for sending/receiving.
  /// @param chainSelector The chain to check.
  /// @return supported is true if it is supported, false if not.
  function isChainSupported(uint64 chainSelector) external view returns (bool supported);

  /// @notice Gets a list of all supported tokens which can be sent or received
  /// to/from a given chain id.
  /// @param chainSelector The chainSelector.
  /// @return tokens The addresses of all tokens that are supported.
  function getSupportedTokens(uint64 chainSelector) external view returns (address[] memory tokens);

  /// @param destinationChainSelector The destination chainSelector
  /// @param message The cross-chain CCIP message including data and/or tokens
  /// @return fee returns execution fee for the message
  /// delivery to destination chain, denominated in the feeToken specified in the message.
  /// @dev Reverts with appropriate reason upon invalid message.
  function getFee(
    uint64 destinationChainSelector,
    Client.EVM2AnyMessage memory message
  ) external view returns (uint256 fee);

  /// @notice Request a message to be sent to the destination chain
  /// @param destinationChainSelector The destination chain ID
  /// @param message The cross-chain CCIP message including data and/or tokens
  /// @return messageId The message ID
  /// @dev Note if msg.value is larger than the required fee (from getFee) we accept
  /// the overpayment with no refund.
  /// @dev Reverts with appropriate reason upon invalid message.
  function ccipSend(
    uint64 destinationChainSelector,
    Client.EVM2AnyMessage calldata message
  ) external payable returns (bytes32);
}

File 4 of 25 : IWrappedNative.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol";

interface IWrappedNative is IERC20 {
  function deposit() external payable;

  function withdraw(uint256 wad) external;
}

File 5 of 25 : Client.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// End consumer library.
library Client {
  /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers.
  struct EVMTokenAmount {
    address token; // token address on the local chain.
    uint256 amount; // Amount of tokens.
  }

  struct Any2EVMMessage {
    bytes32 messageId; // MessageId corresponding to ccipSend on source.
    uint64 sourceChainSelector; // Source chain selector.
    bytes sender; // abi.decode(sender) if coming from an EVM chain.
    bytes data; // payload sent in original message.
    EVMTokenAmount[] destTokenAmounts; // Tokens and their amounts in their destination chain representation.
  }

  // If extraArgs is empty bytes, the default is 200k gas limit.
  struct EVM2AnyMessage {
    bytes receiver; // abi.encode(receiver address) for dest EVM chains
    bytes data; // Data payload
    EVMTokenAmount[] tokenAmounts; // Token transfers
    address feeToken; // Address of feeToken. address(0) means you will send msg.value.
    bytes extraArgs; // Populate this with _argsToBytes(EVMExtraArgsV1)
  }

  // bytes4(keccak256("CCIP EVMExtraArgsV1"));
  bytes4 public constant EVM_EXTRA_ARGS_V1_TAG = 0x97a657c9;
  struct EVMExtraArgsV1 {
    uint256 gasLimit;
  }

  function _argsToBytes(EVMExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {
    return abi.encodeWithSelector(EVM_EXTRA_ARGS_V1_TAG, extraArgs);
  }
}

File 6 of 25 : 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 7 of 25 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 8 of 25 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 9 of 25 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    bool private _paused;

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

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

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

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

File 10 of 25 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 11 of 25 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 12 of 25 : InterportCCIPBridgeCore.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { IRouterClient } from '@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol';
import { Client } from '@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol';
import { BalanceManagementMixin } from '../../../mixins/BalanceManagementMixin.sol';
import { Pausable } from '../../../Pausable.sol';
import { SystemVersionId } from '../../../SystemVersionId.sol';
import '../../../helpers/AddressHelper.sol' as AddressHelper;

/**
 * @title InterportCCIPBridgeCore
 * @notice The core logic of the cross-chain bridging with Chainlink CCIP
 */
abstract contract InterportCCIPBridgeCore is SystemVersionId, Pausable, BalanceManagementMixin {
    /**
     * @notice Chain ID pair structure
     * @param standardId The standard EVM chain ID
     * @param ccipId The CCIP chain selector
     */
    struct ChainIdPair {
        uint256 standardId;
        uint64 ccipId;
    }

    /**
     * @dev CCIP endpoint address
     */
    address public endpoint;

    /**
     * @dev The correspondence between standard EVM chain IDs and CCIP chain selectors
     */
    mapping(uint256 /*standardId*/ => uint64 /*ccipId*/) public standardToCcipChainId;

    /**
     * @dev The correspondence between CCIP chain selectors and standard EVM chain IDs
     */
    mapping(uint64 /*ccipId*/ => uint256 /*standardId*/) public ccipToStandardChainId;

    /**
     * @notice Emitted when the cross-chain endpoint contract reference is set
     * @param endpointAddress The address of the cross-chain endpoint contract
     */
    event SetEndpoint(address indexed endpointAddress);

    /**
     * @notice Emitted when a chain ID pair is added or updated
     * @param standardId The standard EVM chain ID
     * @param ccipId The CCIP chain selector
     */
    event SetChainIdPair(uint256 indexed standardId, uint64 indexed ccipId);

    /**
     * @notice Emitted when a chain ID pair is removed
     * @param standardId The standard EVM chain ID
     * @param ccipId The CCIP chain selector
     */
    event RemoveChainIdPair(uint256 indexed standardId, uint64 indexed ccipId);

    /**
     * @notice Emitted when there is no registered CCIP chain selector matching the standard EVM chain ID
     */
    error CcipChainIdNotSetError();

    /**
     * @notice Emitted when the provided call value is not sufficient for the message processing
     */
    error SendValueError();

    /**
     * @notice Emitted when the caller is not the CCIP endpoint
     */
    error OnlyEndpointError();

    /**
     * @dev Modifier to check if the caller is the CCIP endpoint
     */
    modifier onlyEndpoint() {
        if (msg.sender != endpoint) {
            revert OnlyEndpointError();
        }

        _;
    }

    /**
     * @notice Initializes the contract
     * @param _endpointAddress The cross-chain endpoint address
     * @param _chainIdPairs The correspondence between standard EVM chain IDs and CCIP chain selectors
     * @param _owner The address of the initial owner of the contract
     * @param _managers The addresses of initial managers of the contract
     * @param _addOwnerToManagers The flag to optionally add the owner to the list of managers
     */
    constructor(
        address _endpointAddress,
        ChainIdPair[] memory _chainIdPairs,
        address _owner,
        address[] memory _managers,
        bool _addOwnerToManagers
    ) {
        _setEndpoint(_endpointAddress);

        for (uint256 index; index < _chainIdPairs.length; index++) {
            ChainIdPair memory chainIdPair = _chainIdPairs[index];

            _setChainIdPair(chainIdPair.standardId, chainIdPair.ccipId);
        }

        _initRoles(_owner, _managers, _addOwnerToManagers);
    }

    /**
     * @notice The standard "receive" function
     * @dev Is payable to allow receiving native token funds
     */
    receive() external payable {}

    /**
     * @notice Sets the cross-chain endpoint contract reference
     * @param _endpointAddress The address of the cross-chain endpoint contract
     */
    function setEndpoint(address _endpointAddress) external onlyManager {
        _setEndpoint(_endpointAddress);
    }

    /**
     * @notice Adds or updates registered chain ID pairs
     * @param _chainIdPairs The list of chain ID pairs
     */
    function setChainIdPairs(ChainIdPair[] calldata _chainIdPairs) external onlyManager {
        for (uint256 index; index < _chainIdPairs.length; index++) {
            ChainIdPair calldata chainIdPair = _chainIdPairs[index];

            _setChainIdPair(chainIdPair.standardId, chainIdPair.ccipId);
        }
    }

    /**
     * @notice Removes registered chain ID pairs
     * @param _standardChainIds The list of standard EVM chain IDs
     */
    function removeChainIdPairs(uint256[] calldata _standardChainIds) external onlyManager {
        for (uint256 index; index < _standardChainIds.length; index++) {
            uint256 standardId = _standardChainIds[index];

            _removeChainIdPair(standardId);
        }
    }

    function _ccipSend(
        uint64 _targetCcipChainId,
        Client.EVM2AnyMessage memory _ccipMessage,
        uint256 _ccipSendValue
    ) internal virtual returns (bytes32 ccipMessageId) {
        if (msg.value < _ccipSendValue) {
            revert SendValueError();
        }

        return
            IRouterClient(endpoint).ccipSend{ value: _ccipSendValue }(
                _targetCcipChainId,
                _ccipMessage
            );
    }

    function _setEndpoint(address _endpoint) internal virtual {
        AddressHelper.requireContract(_endpoint);

        endpoint = _endpoint;

        emit SetEndpoint(_endpoint);
    }

    function _setChainIdPair(uint256 _standardId, uint64 _ccipId) internal virtual {
        standardToCcipChainId[_standardId] = _ccipId;
        ccipToStandardChainId[_ccipId] = _standardId;

        emit SetChainIdPair(_standardId, _ccipId);
    }

    function _removeChainIdPair(uint256 _standardId) internal virtual {
        uint64 ccipId = standardToCcipChainId[_standardId];

        delete standardToCcipChainId[_standardId];
        delete ccipToStandardChainId[ccipId];

        emit RemoveChainIdPair(_standardId, ccipId);
    }

    function _checkChainId(uint256 _chainId) internal view virtual returns (uint64 ccipChainId) {
        ccipChainId = standardToCcipChainId[_chainId];

        if (ccipChainId == 0) {
            revert CcipChainIdNotSetError();
        }
    }

    function _ccipGetFee(
        uint64 _targetCcipChainId,
        Client.EVM2AnyMessage memory _ccipMessage
    ) internal view virtual returns (uint256 fee) {
        return IRouterClient(endpoint).getFee(_targetCcipChainId, _ccipMessage);
    }

    function _createCcipMessage(
        address _receiverAddress, // The receiver may be an EOA or a contract
        bytes memory _data,
        Client.EVMTokenAmount[] memory _tokenAmounts,
        uint256 _targetGasLimit
    ) internal pure virtual returns (Client.EVM2AnyMessage memory) {
        return
            Client.EVM2AnyMessage({
                receiver: abi.encode(_receiverAddress), // ABI-encoded receiver address
                data: _data,
                tokenAmounts: _tokenAmounts,
                extraArgs: Client._argsToBytes(
                    Client.EVMExtraArgsV1({ gasLimit: _targetGasLimit })
                ),
                feeToken: address(0) // Native token
            });
    }
}

File 13 of 25 : Constants.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @dev The default token decimals value
 */
uint256 constant DECIMALS_DEFAULT = 18;

/**
 * @dev The maximum uint256 value for swap amount limit settings
 */
uint256 constant INFINITY = type(uint256).max;

/**
 * @dev The default limit of account list size
 */
uint256 constant LIST_SIZE_LIMIT_DEFAULT = 100;

/**
 * @dev The limit of swap router list size
 */
uint256 constant LIST_SIZE_LIMIT_ROUTERS = 200;

/**
 * @dev The factor for percentage settings. Example: 100 is 0.1%
 */
uint256 constant MILLIPERCENT_FACTOR = 100_000;

/**
 * @dev The de facto standard address to denote the native token
 */
address constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

File 14 of 25 : CrosschainPeerMixin.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { ManagerRole } from '../../roles/ManagerRole.sol';
import { ZeroAddressError } from '../../Errors.sol';
import '../../Constants.sol' as Constants;
import '../../DataStructures.sol' as DataStructures;

/**
 * @title CrosschainPeerMixin
 * @notice The cross-chain peer mix-in logic
 */
abstract contract CrosschainPeerMixin is ManagerRole {
    /**
     * @dev Registered peer app addresses by the chain ID
     */
    mapping(uint256 /*peerChainId*/ => address /*peerAddress*/) public peerMap;

    /**
     * @dev Registered peer app chain IDs
     */
    uint256[] public peerChainIdList;

    /**
     * @dev Registered peer app chain ID indices
     */
    mapping(uint256 /*peerChainId*/ => DataStructures.OptionalValue /*peerChainIdIndex*/)
        public peerChainIdIndexMap;

    /**
     * @notice Emitted when a registered peer app contract address is added or updated
     * @param chainId The chain ID of the registered peer app
     * @param peerAddress The address of the registered peer app contract
     */
    event SetPeer(uint256 indexed chainId, address indexed peerAddress);

    /**
     * @notice Emitted when a registered peer app contract address is removed
     * @param chainId The chain ID of the registered peer app
     */
    event RemovePeer(uint256 indexed chainId);

    /**
     * @notice Emitted when the peer config address for the current chain does not match the current contract
     */
    error PeerAddressMismatchError();

    /**
     * @notice Emitted when the peer app address for the specified chain is not set
     */
    error PeerNotSetError();

    /**
     * @notice Emitted when the chain ID is not set
     */
    error ZeroChainIdError();

    /**
     * @notice Adds or updates registered peer apps
     * @param _peers Chain IDs and addresses of peer apps
     */
    function setPeers(
        DataStructures.KeyToAddressValue[] calldata _peers
    ) external virtual onlyManager {
        for (uint256 index; index < _peers.length; index++) {
            DataStructures.KeyToAddressValue calldata item = _peers[index];

            uint256 chainId = item.key;
            address peerAddress = item.value;

            // Allow the same configuration on multiple chains
            if (chainId == block.chainid) {
                if (peerAddress != address(this)) {
                    revert PeerAddressMismatchError();
                }
            } else {
                _setPeer(chainId, peerAddress);
            }
        }
    }

    /**
     * @notice Removes registered peer apps
     * @param _chainIds Peer app chain IDs
     */
    function removePeers(uint256[] calldata _chainIds) external virtual onlyManager {
        for (uint256 index; index < _chainIds.length; index++) {
            uint256 chainId = _chainIds[index];

            // Allow the same configuration on multiple chains
            if (chainId != block.chainid) {
                _removePeer(chainId);
            }
        }
    }

    /**
     * @notice Getter of the peer app count
     * @return The peer app count
     */
    function peerCount() external view virtual returns (uint256) {
        return peerChainIdList.length;
    }

    /**
     * @notice Getter of the complete list of the peer app chain IDs
     * @return The complete list of the peer app chain IDs
     */
    function fullPeerChainIdList() external view virtual returns (uint256[] memory) {
        return peerChainIdList;
    }

    function _setPeer(uint256 _chainId, address _peerAddress) internal virtual {
        if (_chainId == 0) {
            revert ZeroChainIdError();
        }

        if (_peerAddress == address(0)) {
            revert ZeroAddressError();
        }

        DataStructures.combinedMapSet(
            peerMap,
            peerChainIdList,
            peerChainIdIndexMap,
            _chainId,
            _peerAddress,
            Constants.LIST_SIZE_LIMIT_DEFAULT
        );

        emit SetPeer(_chainId, _peerAddress);
    }

    function _removePeer(uint256 _chainId) internal virtual {
        if (_chainId == 0) {
            revert ZeroChainIdError();
        }

        DataStructures.combinedMapRemove(peerMap, peerChainIdList, peerChainIdIndexMap, _chainId);

        emit RemovePeer(_chainId);
    }

    function _checkPeerAddress(uint256 _chainId) internal view virtual returns (address) {
        address peerAddress = peerMap[_chainId];

        if (peerAddress == address(0)) {
            revert PeerNotSetError();
        }

        return peerAddress;
    }
}

File 15 of 25 : TargetAppGasMixin.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { ManagerRole } from '../../roles/ManagerRole.sol';
import '../../DataStructures.sol' as DataStructures;

/**
 * @title TargetAppGasCore
 * @notice The target app gas mix-in logic
 */
abstract contract TargetAppGasMixin is ManagerRole {
    /**
     * @dev The default value of minimum target app gas
     */
    uint256 public minTargetAppGasDefault;

    /**
     * @dev The custom values of minimum target app gas by standard chain IDs
     */
    mapping(uint256 /*standardChainId*/ => DataStructures.OptionalValue /*minTargetAppGas*/)
        public minTargetAppGasCustom;

    /**
     * @notice Emitted when the default value of minimum target app gas is set
     * @param minTargetAppGas The value of minimum target app gas
     */
    event SetMinTargetAppGasDefault(uint256 minTargetAppGas);

    /**
     * @notice Emitted when the custom value of minimum target app gas is set
     * @param standardChainId The standard EVM chain ID
     * @param minTargetAppGas The value of minimum target app gas
     */
    event SetMinTargetAppGasCustom(uint256 standardChainId, uint256 minTargetAppGas);

    /**
     * @notice Emitted when the custom value of minimum target app gas is removed
     * @param standardChainId The standard EVM chain ID
     */
    event RemoveMinTargetAppGasCustom(uint256 standardChainId);

    /**
     * @notice Emitted when the provided target app gas value is not sufficient for the message processing
     */
    error MinTargetAppGasError();

    /**
     * @notice Initializes the contract
     * @param _minTargetAppGasDefault The default value of minimum target app gas
     * @param _minTargetAppGasCustomData The custom values of minimum target app gas by standard chain IDs
     */
    constructor(
        uint256 _minTargetAppGasDefault,
        DataStructures.KeyToValue[] memory _minTargetAppGasCustomData
    ) {
        _setMinTargetAppGasDefault(_minTargetAppGasDefault);

        for (uint256 index; index < _minTargetAppGasCustomData.length; index++) {
            DataStructures.KeyToValue
                memory minTargetAppGasCustomEntry = _minTargetAppGasCustomData[index];

            _setMinTargetAppGasCustom(
                minTargetAppGasCustomEntry.key,
                minTargetAppGasCustomEntry.value
            );
        }
    }

    /**
     * @notice Sets the default value of minimum target app gas
     * @param _minTargetAppGas The value of minimum target app gas
     */
    function setMinTargetAppGasDefault(uint256 _minTargetAppGas) external virtual onlyManager {
        _setMinTargetAppGasDefault(_minTargetAppGas);
    }

    /**
     * @notice Sets the custom value of minimum target app gas by the standard chain ID
     * @param _standardChainId The standard EVM ID of the target chain
     * @param _minTargetAppGas The value of minimum target app gas
     */
    function setMinTargetAppGasCustom(
        uint256 _standardChainId,
        uint256 _minTargetAppGas
    ) external virtual onlyManager {
        _setMinTargetAppGasCustom(_standardChainId, _minTargetAppGas);
    }

    /**
     * @notice Removes the custom value of minimum target app gas by the standard chain ID
     * @param _standardChainId The standard EVM ID of the target chain
     */
    function removeMinTargetAppGasCustom(uint256 _standardChainId) external virtual onlyManager {
        _removeMinTargetAppGasCustom(_standardChainId);
    }

    /**
     * @notice The value of minimum target app gas by the standard chain ID
     * @param _standardChainId The standard EVM ID of the target chain
     * @return The value of minimum target app gas
     */
    function minTargetAppGas(uint256 _standardChainId) public view virtual returns (uint256) {
        DataStructures.OptionalValue storage optionalValue = minTargetAppGasCustom[
            _standardChainId
        ];

        if (optionalValue.isSet) {
            return optionalValue.value;
        }

        return minTargetAppGasDefault;
    }

    function _setMinTargetAppGasDefault(uint256 _minTargetAppGas) internal virtual {
        minTargetAppGasDefault = _minTargetAppGas;

        emit SetMinTargetAppGasDefault(_minTargetAppGas);
    }

    function _setMinTargetAppGasCustom(
        uint256 _standardChainId,
        uint256 _minTargetAppGas
    ) internal virtual {
        minTargetAppGasCustom[_standardChainId] = DataStructures.OptionalValue({
            isSet: true,
            value: _minTargetAppGas
        });

        emit SetMinTargetAppGasCustom(_standardChainId, _minTargetAppGas);
    }

    function _removeMinTargetAppGasCustom(uint256 _standardChainId) internal virtual {
        delete minTargetAppGasCustom[_standardChainId];

        emit RemoveMinTargetAppGasCustom(_standardChainId);
    }

    function _checkTargetAppGas(
        uint256 _targetChainId,
        uint256 _targetAppGas
    ) internal view virtual {
        if (_targetAppGas < minTargetAppGas(_targetChainId)) {
            revert MinTargetAppGasError();
        }
    }
}

File 16 of 25 : DataStructures.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @notice Optional value structure
 * @dev Is used in mappings to allow zero values
 * @param isSet Value presence flag
 * @param value Numeric value
 */
struct OptionalValue {
    bool isSet;
    uint256 value;
}

/**
 * @notice Key-to-value structure
 * @dev Is used as an array parameter item to perform multiple key-value settings
 * @param key Numeric key
 * @param value Numeric value
 */
struct KeyToValue {
    uint256 key;
    uint256 value;
}

/**
 * @notice Key-to-value structure for address values
 * @dev Is used as an array parameter item to perform multiple key-value settings with address values
 * @param key Numeric key
 * @param value Address value
 */
struct KeyToAddressValue {
    uint256 key;
    address value;
}

/**
 * @notice Address-to-flag structure
 * @dev Is used as an array parameter item to perform multiple settings
 * @param account Account address
 * @param flag Flag value
 */
struct AccountToFlag {
    address account;
    bool flag;
}

/**
 * @notice Emitted when a list exceeds the size limit
 */
error ListSizeLimitError();

/**
 * @notice Sets or updates a value in a combined map (a mapping with a key list and key index mapping)
 * @param _map The mapping reference
 * @param _keyList The key list reference
 * @param _keyIndexMap The key list index mapping reference
 * @param _key The numeric key
 * @param _value The address value
 * @param _sizeLimit The map and list size limit
 * @return isNewKey True if the key was just added, otherwise false
 */
function combinedMapSet(
    mapping(uint256 => address) storage _map,
    uint256[] storage _keyList,
    mapping(uint256 => OptionalValue) storage _keyIndexMap,
    uint256 _key,
    address _value,
    uint256 _sizeLimit
) returns (bool isNewKey) {
    isNewKey = !_keyIndexMap[_key].isSet;

    if (isNewKey) {
        uniqueListAdd(_keyList, _keyIndexMap, _key, _sizeLimit);
    }

    _map[_key] = _value;
}

/**
 * @notice Removes a value from a combined map (a mapping with a key list and key index mapping)
 * @param _map The mapping reference
 * @param _keyList The key list reference
 * @param _keyIndexMap The key list index mapping reference
 * @param _key The numeric key
 * @return isChanged True if the combined map was changed, otherwise false
 */
function combinedMapRemove(
    mapping(uint256 => address) storage _map,
    uint256[] storage _keyList,
    mapping(uint256 => OptionalValue) storage _keyIndexMap,
    uint256 _key
) returns (bool isChanged) {
    isChanged = _keyIndexMap[_key].isSet;

    if (isChanged) {
        delete _map[_key];
        uniqueListRemove(_keyList, _keyIndexMap, _key);
    }
}

/**
 * @notice Adds a value to a unique value list (a list with value index mapping)
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The numeric value
 * @param _sizeLimit The list size limit
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueListAdd(
    uint256[] storage _list,
    mapping(uint256 => OptionalValue) storage _indexMap,
    uint256 _value,
    uint256 _sizeLimit
) returns (bool isChanged) {
    isChanged = !_indexMap[_value].isSet;

    if (isChanged) {
        if (_list.length >= _sizeLimit) {
            revert ListSizeLimitError();
        }

        _indexMap[_value] = OptionalValue(true, _list.length);
        _list.push(_value);
    }
}

/**
 * @notice Removes a value from a unique value list (a list with value index mapping)
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The numeric value
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueListRemove(
    uint256[] storage _list,
    mapping(uint256 => OptionalValue) storage _indexMap,
    uint256 _value
) returns (bool isChanged) {
    OptionalValue storage indexItem = _indexMap[_value];

    isChanged = indexItem.isSet;

    if (isChanged) {
        uint256 itemIndex = indexItem.value;
        uint256 lastIndex = _list.length - 1;

        if (itemIndex != lastIndex) {
            uint256 lastValue = _list[lastIndex];
            _list[itemIndex] = lastValue;
            _indexMap[lastValue].value = itemIndex;
        }

        _list.pop();
        delete _indexMap[_value];
    }
}

/**
 * @notice Adds a value to a unique address value list (a list with value index mapping)
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The address value
 * @param _sizeLimit The list size limit
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueAddressListAdd(
    address[] storage _list,
    mapping(address => OptionalValue) storage _indexMap,
    address _value,
    uint256 _sizeLimit
) returns (bool isChanged) {
    isChanged = !_indexMap[_value].isSet;

    if (isChanged) {
        if (_list.length >= _sizeLimit) {
            revert ListSizeLimitError();
        }

        _indexMap[_value] = OptionalValue(true, _list.length);
        _list.push(_value);
    }
}

/**
 * @notice Removes a value from a unique address value list (a list with value index mapping)
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The address value
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueAddressListRemove(
    address[] storage _list,
    mapping(address => OptionalValue) storage _indexMap,
    address _value
) returns (bool isChanged) {
    OptionalValue storage indexItem = _indexMap[_value];

    isChanged = indexItem.isSet;

    if (isChanged) {
        uint256 itemIndex = indexItem.value;
        uint256 lastIndex = _list.length - 1;

        if (itemIndex != lastIndex) {
            address lastValue = _list[lastIndex];
            _list[itemIndex] = lastValue;
            _indexMap[lastValue].value = itemIndex;
        }

        _list.pop();
        delete _indexMap[_value];
    }
}

/**
 * @notice Adds or removes a value to/from a unique address value list (a list with value index mapping)
 * @dev The list size limit is checked on items adding only
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The address value
 * @param _flag The value inclusion flag
 * @param _sizeLimit The list size limit
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueAddressListUpdate(
    address[] storage _list,
    mapping(address => OptionalValue) storage _indexMap,
    address _value,
    bool _flag,
    uint256 _sizeLimit
) returns (bool isChanged) {
    return
        _flag
            ? uniqueAddressListAdd(_list, _indexMap, _value, _sizeLimit)
            : uniqueAddressListRemove(_list, _indexMap, _value);
}

File 17 of 25 : Errors.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @notice Emitted when an attempt to burn a token fails
 */
error TokenBurnError();

/**
 * @notice Emitted when an attempt to mint a token fails
 */
error TokenMintError();

/**
 * @notice Emitted when a zero address is specified where it is not allowed
 */
error ZeroAddressError();

File 18 of 25 : AddressHelper.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @notice Emitted when the account is not a contract
 * @param account The account address
 */
error NonContractAddressError(address account);

/**
 * @notice Function to check if the account is a contract
 * @return The account contract status flag
 */
function isContract(address _account) view returns (bool) {
    return _account.code.length > 0;
}

/**
 * @notice Function to require an account to be a contract
 */
function requireContract(address _account) view {
    if (!isContract(_account)) {
        revert NonContractAddressError(_account);
    }
}

/**
 * @notice Function to require an account to be a contract or a zero address
 */
function requireContractOrZeroAddress(address _account) view {
    if (_account != address(0)) {
        requireContract(_account);
    }
}

File 19 of 25 : TransferHelper.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @notice Emitted when an approval action fails
 */
error SafeApproveError();

/**
 * @notice Emitted when a transfer action fails
 */
error SafeTransferError();

/**
 * @notice Emitted when a transferFrom action fails
 */
error SafeTransferFromError();

/**
 * @notice Emitted when a transfer of the native token fails
 */
error SafeTransferNativeError();

/**
 * @notice Safely approve the token to the account
 * @param _token The token address
 * @param _to The token approval recipient address
 * @param _value The token approval amount
 */
function safeApprove(address _token, address _to, uint256 _value) {
    // 0x095ea7b3 is the selector for "approve(address,uint256)"
    (bool success, bytes memory data) = _token.call(
        abi.encodeWithSelector(0x095ea7b3, _to, _value)
    );

    bool condition = success && (data.length == 0 || abi.decode(data, (bool)));

    if (!condition) {
        revert SafeApproveError();
    }
}

/**
 * @notice Safely transfer the token to the account
 * @param _token The token address
 * @param _to The token transfer recipient address
 * @param _value The token transfer amount
 */
function safeTransfer(address _token, address _to, uint256 _value) {
    // 0xa9059cbb is the selector for "transfer(address,uint256)"
    (bool success, bytes memory data) = _token.call(
        abi.encodeWithSelector(0xa9059cbb, _to, _value)
    );

    bool condition = success && (data.length == 0 || abi.decode(data, (bool)));

    if (!condition) {
        revert SafeTransferError();
    }
}

/**
 * @notice Safely transfer the token between the accounts
 * @param _token The token address
 * @param _from The token transfer source address
 * @param _to The token transfer recipient address
 * @param _value The token transfer amount
 */
function safeTransferFrom(address _token, address _from, address _to, uint256 _value) {
    // 0x23b872dd is the selector for "transferFrom(address,address,uint256)"
    (bool success, bytes memory data) = _token.call(
        abi.encodeWithSelector(0x23b872dd, _from, _to, _value)
    );

    bool condition = success && (data.length == 0 || abi.decode(data, (bool)));

    if (!condition) {
        revert SafeTransferFromError();
    }
}

/**
 * @notice Safely transfer the native token to the account
 * @param _to The native token transfer recipient address
 * @param _value The native token transfer amount
 */
function safeTransferNative(address _to, uint256 _value) {
    (bool success, ) = _to.call{ value: _value }(new bytes(0));

    if (!success) {
        revert SafeTransferNativeError();
    }
}

File 20 of 25 : ITokenBalance.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @title ITokenBalance
 * @notice Token balance interface
 */
interface ITokenBalance {
    /**
     * @notice Getter of the token balance by the account
     * @param _account The account address
     * @return Token balance
     */
    function balanceOf(address _account) external view returns (uint256);
}

File 21 of 25 : BalanceManagementMixin.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { ITokenBalance } from '../interfaces/ITokenBalance.sol';
import { ManagerRole } from '../roles/ManagerRole.sol';
import '../helpers/TransferHelper.sol' as TransferHelper;
import '../Constants.sol' as Constants;

/**
 * @title BalanceManagementMixin
 * @notice The balance management mix-in logic
 */
abstract contract BalanceManagementMixin is ManagerRole {
    /**
     * @notice Emitted when the specified token is reserved
     */
    error ReservedTokenError();

    /**
     * @notice Performs the token cleanup
     * @dev Use the "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" address for the native token
     * @param _tokenAddress The address of the token
     * @param _to The token transfer recipient address
     */
    function cleanup(address _tokenAddress, address _to) external virtual onlyManager {
        _cleanupWithAmount(_tokenAddress, _to, tokenBalance(_tokenAddress));
    }

    /**
     * @notice Performs the token cleanup using the provided amount
     * @dev Use the "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" address for the native token
     * @param _tokenAddress The address of the token
     * @param _to The token transfer recipient address
     * @param _tokenAmount The amount of the token
     */
    function cleanupWithAmount(
        address _tokenAddress,
        address _to,
        uint256 _tokenAmount
    ) external virtual onlyManager {
        _cleanupWithAmount(_tokenAddress, _to, _tokenAmount);
    }

    /**
     * @notice Getter of the token balance of the current contract
     * @dev Use the "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" address for the native token
     * @param _tokenAddress The address of the token
     * @return The token balance of the current contract
     */
    function tokenBalance(address _tokenAddress) public view virtual returns (uint256) {
        if (_tokenAddress == Constants.NATIVE_TOKEN_ADDRESS) {
            return address(this).balance;
        } else {
            return ITokenBalance(_tokenAddress).balanceOf(address(this));
        }
    }

    /**
     * @notice Getter of the reserved token flag
     * @dev Override to add reserved token addresses
     * @param _tokenAddress The address of the token
     * @return The reserved token flag
     */
    function isReservedToken(address _tokenAddress) public view virtual returns (bool) {
        // The function returns false by default.
        // The explicit return statement is omitted to avoid the unused parameter warning.
        // See https://github.com/ethereum/solidity/issues/5295
    }

    function _cleanupWithAmount(
        address _tokenAddress,
        address _to,
        uint256 _tokenAmount
    ) internal virtual {
        if (isReservedToken(_tokenAddress)) {
            revert ReservedTokenError();
        }

        if (_tokenAddress == Constants.NATIVE_TOKEN_ADDRESS) {
            TransferHelper.safeTransferNative(_to, _tokenAmount);
        } else {
            TransferHelper.safeTransfer(_tokenAddress, _to, _tokenAmount);
        }
    }
}

File 22 of 25 : Pausable.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { Pausable as PausableBase } from '@openzeppelin/contracts/security/Pausable.sol';
import { ManagerRole } from './roles/ManagerRole.sol';

/**
 * @title Pausable
 * @notice Base contract that implements the emergency pause mechanism
 */
abstract contract Pausable is PausableBase, ManagerRole {
    /**
     * @notice Enter pause state
     */
    function pause() external onlyManager whenNotPaused {
        _pause();
    }

    /**
     * @notice Exit pause state
     */
    function unpause() external onlyManager whenPaused {
        _unpause();
    }
}

File 23 of 25 : ManagerRole.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { RoleBearers } from './RoleBearers.sol';

/**
 * @title ManagerRole
 * @notice Base contract that implements the Manager role.
 * The manager role is a high-permission role for core team members only.
 * Managers can set vaults and routers addresses, fees, cross-chain protocols,
 * and other parameters for Interchain (cross-chain) swaps and single-network swaps.
 * Please note, the manager role is unique for every contract,
 * hence different addresses may be assigned as managers for different contracts.
 */
abstract contract ManagerRole is Ownable, RoleBearers {
    bytes32 private constant ROLE_KEY = keccak256('Manager');

    /**
     * @notice Emitted when the Manager role status for the account is updated
     * @param account The account address
     * @param value The Manager role status flag
     */
    event SetManager(address indexed account, bool indexed value);

    /**
     * @notice Emitted when the Manager role status for the account is renounced
     * @param account The account address
     */
    event RenounceManagerRole(address indexed account);

    /**
     * @notice Emitted when the caller is not a Manager role bearer
     */
    error OnlyManagerError();

    /**
     * @dev Modifier to check if the caller is a Manager role bearer
     */
    modifier onlyManager() {
        if (!isManager(msg.sender)) {
            revert OnlyManagerError();
        }

        _;
    }

    /**
     * @notice Updates the Manager role status for the account
     * @param _account The account address
     * @param _value The Manager role status flag
     */
    function setManager(address _account, bool _value) public onlyOwner {
        _setRoleBearer(ROLE_KEY, _account, _value);

        emit SetManager(_account, _value);
    }

    /**
     * @notice Renounces the Manager role
     */
    function renounceManagerRole() external onlyManager {
        _setRoleBearer(ROLE_KEY, msg.sender, false);

        emit RenounceManagerRole(msg.sender);
    }

    /**
     * @notice Getter of the Manager role bearer count
     * @return The Manager role bearer count
     */
    function managerCount() external view returns (uint256) {
        return _roleBearerCount(ROLE_KEY);
    }

    /**
     * @notice Getter of the complete list of the Manager role bearers
     * @return The complete list of the Manager role bearers
     */
    function fullManagerList() external view returns (address[] memory) {
        return _fullRoleBearerList(ROLE_KEY);
    }

    /**
     * @notice Getter of the Manager role bearer status
     * @param _account The account address
     */
    function isManager(address _account) public view returns (bool) {
        return _isRoleBearer(ROLE_KEY, _account);
    }

    function _initRoles(
        address _owner,
        address[] memory _managers,
        bool _addOwnerToManagers
    ) internal {
        address ownerAddress = _owner == address(0) ? msg.sender : _owner;

        for (uint256 index; index < _managers.length; index++) {
            setManager(_managers[index], true);
        }

        if (_addOwnerToManagers && !isManager(ownerAddress)) {
            setManager(ownerAddress, true);
        }

        if (ownerAddress != msg.sender) {
            transferOwnership(ownerAddress);
        }
    }
}

File 24 of 25 : RoleBearers.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import '../Constants.sol' as Constants;
import '../DataStructures.sol' as DataStructures;

/**
 * @title RoleBearers
 * @notice Base contract that implements role-based access control
 * @dev A custom implementation providing full role bearer lists
 */
abstract contract RoleBearers {
    mapping(bytes32 /*roleKey*/ => address[] /*roleBearers*/) private roleBearerTable;
    mapping(bytes32 /*roleKey*/ => mapping(address /*account*/ => DataStructures.OptionalValue /*status*/))
        private roleBearerIndexTable;

    function _setRoleBearer(bytes32 _roleKey, address _account, bool _value) internal {
        DataStructures.uniqueAddressListUpdate(
            roleBearerTable[_roleKey],
            roleBearerIndexTable[_roleKey],
            _account,
            _value,
            Constants.LIST_SIZE_LIMIT_DEFAULT
        );
    }

    function _isRoleBearer(bytes32 _roleKey, address _account) internal view returns (bool) {
        return roleBearerIndexTable[_roleKey][_account].isSet;
    }

    function _roleBearerCount(bytes32 _roleKey) internal view returns (uint256) {
        return roleBearerTable[_roleKey].length;
    }

    function _fullRoleBearerList(bytes32 _roleKey) internal view returns (address[] memory) {
        return roleBearerTable[_roleKey];
    }
}

File 25 of 25 : SystemVersionId.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @title SystemVersionId
 * @notice Base contract providing the system version identifier
 */
abstract contract SystemVersionId {
    /**
     * @dev The system version identifier
     */
    uint256 public constant SYSTEM_VERSION_ID = uint256(keccak256('Initial'));
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_endpointAddress","type":"address"},{"components":[{"internalType":"uint256","name":"standardId","type":"uint256"},{"internalType":"uint64","name":"ccipId","type":"uint64"}],"internalType":"struct InterportCCIPBridgeCore.ChainIdPair[]","name":"_chainIdPairs","type":"tuple[]"},{"internalType":"uint256","name":"_minTargetAppGasDefault","type":"uint256"},{"components":[{"internalType":"uint256","name":"key","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct KeyToValue[]","name":"_minTargetAppGasCustomData","type":"tuple[]"},{"internalType":"uint256","name":"_nativeTransferGasLimit","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address[]","name":"_managers","type":"address[]"},{"internalType":"bool","name":"_addOwnerToManagers","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CcipChainIdNotSetError","type":"error"},{"inputs":[],"name":"ListSizeLimitError","type":"error"},{"inputs":[],"name":"MinTargetAppGasError","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"NonContractAddressError","type":"error"},{"inputs":[],"name":"OnlyEndpointError","type":"error"},{"inputs":[],"name":"OnlyManagerError","type":"error"},{"inputs":[],"name":"PeerAddressMismatchError","type":"error"},{"inputs":[],"name":"PeerNotSetError","type":"error"},{"inputs":[],"name":"ReservedTokenError","type":"error"},{"inputs":[],"name":"SafeApproveError","type":"error"},{"inputs":[],"name":"SafeTransferError","type":"error"},{"inputs":[],"name":"SafeTransferFromError","type":"error"},{"inputs":[],"name":"SafeTransferNativeError","type":"error"},{"inputs":[],"name":"SendValueError","type":"error"},{"inputs":[],"name":"ZeroAddressError","type":"error"},{"inputs":[],"name":"ZeroChainIdError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"actionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"targetChainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"sourceSender","type":"address"},{"indexed":false,"internalType":"address","name":"targetRecipient","type":"address"},{"indexed":false,"internalType":"bool","name":"fromWrapped","type":"bool"},{"indexed":false,"internalType":"bool","name":"toWrapped","type":"bool"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reserve","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"ccipMessageId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"NativeBridgeActionSource","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"actionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"toWrapped","type":"bool"},{"indexed":false,"internalType":"bool","name":"defaultWrapped","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"NativeBridgeActionTarget","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"standardId","type":"uint256"},{"indexed":true,"internalType":"uint64","name":"ccipId","type":"uint64"}],"name":"RemoveChainIdPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"standardChainId","type":"uint256"}],"name":"RemoveMinTargetAppGasCustom","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"RemovePeer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"RenounceManagerRole","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"standardId","type":"uint256"},{"indexed":true,"internalType":"uint64","name":"ccipId","type":"uint64"}],"name":"SetChainIdPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"endpointAddress","type":"address"}],"name":"SetEndpoint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"standardChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minTargetAppGas","type":"uint256"}],"name":"SetMinTargetAppGasCustom","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minTargetAppGas","type":"uint256"}],"name":"SetMinTargetAppGasDefault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nativeTransferGasLimit","type":"uint256"}],"name":"SetNativeTransferGasLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"peerAddress","type":"address"}],"name":"SetPeer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"}],"name":"TargetFromAddressFailure","type":"event"},{"anonymous":false,"inputs":[],"name":"TargetPausedFailure","type":"event"},{"anonymous":false,"inputs":[],"name":"TargetTokenListFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"SYSTEM_VERSION_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"targetChainId","type":"uint256"},{"internalType":"address","name":"targetRecipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"targetAppGas","type":"uint256"}],"internalType":"struct InterportCCIPNativeBridge.NativeBridgeAction","name":"_action","type":"tuple"},{"components":[{"internalType":"bool","name":"fromWrapped","type":"bool"},{"internalType":"bool","name":"toWrapped","type":"bool"}],"internalType":"struct InterportCCIPNativeBridge.NativeBridgeFlags","name":"_flags","type":"tuple"},{"internalType":"uint256","name":"_ccipSendValue","type":"uint256"}],"name":"bridgeNative","outputs":[{"internalType":"uint256","name":"actionId","type":"uint256"},{"internalType":"bytes32","name":"ccipMessageId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"messageId","type":"bytes32"},{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"bytes","name":"sender","type":"bytes"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Client.EVMTokenAmount[]","name":"destTokenAmounts","type":"tuple[]"}],"internalType":"struct Client.Any2EVMMessage","name":"_message","type":"tuple"}],"name":"ccipReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"","type":"uint64"}],"name":"ccipToStandardChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"cleanup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"cleanupWithAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fullManagerList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fullPeerChainIdList","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"isReservedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"targetChainId","type":"uint256"},{"internalType":"address","name":"targetRecipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"targetAppGas","type":"uint256"}],"internalType":"struct InterportCCIPNativeBridge.NativeBridgeAction","name":"_action","type":"tuple"}],"name":"messageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_standardChainId","type":"uint256"}],"name":"minTargetAppGas","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"minTargetAppGasCustom","outputs":[{"internalType":"bool","name":"isSet","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTargetAppGasDefault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeTransferGasLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"peerChainIdIndexMap","outputs":[{"internalType":"bool","name":"isSet","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"peerChainIdList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"peerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"peerMap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_standardChainIds","type":"uint256[]"}],"name":"removeChainIdPairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_standardChainId","type":"uint256"}],"name":"removeMinTargetAppGasCustom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_chainIds","type":"uint256[]"}],"name":"removePeers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceManagerRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"standardId","type":"uint256"},{"internalType":"uint64","name":"ccipId","type":"uint64"}],"internalType":"struct InterportCCIPBridgeCore.ChainIdPair[]","name":"_chainIdPairs","type":"tuple[]"}],"name":"setChainIdPairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_endpointAddress","type":"address"}],"name":"setEndpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_value","type":"bool"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_standardChainId","type":"uint256"},{"internalType":"uint256","name":"_minTargetAppGas","type":"uint256"}],"name":"setMinTargetAppGasCustom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minTargetAppGas","type":"uint256"}],"name":"setMinTargetAppGasDefault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nativeTransferGasLimit","type":"uint256"}],"name":"setNativeTransferGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"key","type":"uint256"},{"internalType":"address","name":"value","type":"address"}],"internalType":"struct KeyToAddressValue[]","name":"_peers","type":"tuple[]"}],"name":"setPeers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"standardToCcipChainId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"tokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405262000015466402540be4006200085c565b620000259063b7f6160962000876565b600d553480156200003557600080fd5b5060405162003c5c38038062003c5c833981016040819052620000589162000af9565b6000805460ff1916905585858989868686620000743362000180565b6200007f85620001d9565b60005b8451811015620000dd576000858281518110620000a357620000a362000bd7565b60200260200101519050620000c7816000015182602001516200022e60201b60201c565b5080620000d48162000bed565b91505062000082565b50620000eb83838362000296565b505050505062000101826200035060201b60201c565b60005b81518110156200015f57600082828151811062000125576200012562000bd7565b6020026020010151905062000149816000015182602001516200038c60201b60201c565b5080620001568162000bed565b91505062000104565b50506001600b55506200017284620003ff565b505050505050505062000c35565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b620001e48162000435565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fc8e81a4efc849969069ec6aae575cf7a6bc5f9d3abac59f4ed190a6f7e05fc6f90600090a250565b600082815260046020908152604080832080546001600160401b0319166001600160401b038616908117909155808452600590925280832085905551909184917ff8ee8bf96f2e1a5ac4438005dc0c9020d64a0b189f2629046a44cbbe2f5a42eb9190a35050565b60006001600160a01b03841615620002af5783620002b1565b335b905060005b83518110156200030457620002ef848281518110620002d957620002d962000bd7565b602002602001015160016200047160201b60201c565b80620002fb8162000bed565b915050620002b6565b508180156200031b57506200031981620004e4565b155b156200032e576200032e81600162000471565b6001600160a01b03811633146200034a576200034a8162000526565b50505050565b60098190556040518181527f7d13ea4e82ca085561ddd42a2f1080d88b527444721ee7803f603decd203ff23906020015b60405180910390a150565b604080518082018252600180825260208083018581526000878152600a83528590209351845460ff191690151517845551929091019190915581518481529081018390527f2ee636de87a5f853f736b571d71f38b0eaa7a494ab78d545a4e69975fb3a0e3f910160405180910390a15050565b600c8190556040518181527f07f2da272b0090c4177cfbb7f50d00e3ed4d37c9445216ca7efbc245d7b5b0ac9060200162000381565b6001600160a01b0381163b6200046e57604051638c50d7cd60e01b81526001600160a01b03821660048201526024015b60405180910390fd5b50565b6200047b620005a2565b620004a87f6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6f838362000606565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff165b92915050565b62000530620005a2565b6001600160a01b038116620005975760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000465565b6200046e8162000180565b6000546001600160a01b03610100909104163314620006045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000465565b565b600083815260016020908152604080832060029092529091206200034a91908484606460008262000644576200063e8686866200065c565b62000652565b620006528686868562000791565b9695505050505050565b6001600160a01b0381166000908152602083905260409020805460ff169081156200078957600180820154865490916000916200069a919062000c09565b90508082146200072e576000878281548110620006bb57620006bb62000bd7565b9060005260206000200160009054906101000a90046001600160a01b0316905080888481548110620006f157620006f162000bd7565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b8680548062000741576200074162000c1f565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff161580156200083e5784548211620007d75760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b03881660008181528a83529586209451855460ff1916901515178555915193830193909355885491820189558884529190922090910180546001600160a01b03191690911790555b949350505050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141762000520576200052062000846565b8082018082111562000520576200052062000846565b80516001600160a01b0381168114620008a457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715620008e457620008e4620008a9565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620009155762000915620008a9565b604052919050565b60006001600160401b03821115620009395762000939620008a9565b5060051b60200190565b600082601f8301126200095557600080fd5b815160206200096e62000968836200091d565b620008ea565b82815260069290921b840181019181810190868411156200098e57600080fd5b8286015b84811015620009e95760408189031215620009ad5760008081fd5b620009b7620008bf565b81518152848201516001600160401b0381168114620009d65760008081fd5b8186015283529183019160400162000992565b509695505050505050565b600082601f83011262000a0657600080fd5b8151602062000a1962000968836200091d565b82815260069290921b8401810191818101908684111562000a3957600080fd5b8286015b84811015620009e9576040818903121562000a585760008081fd5b62000a62620008bf565b81518152848201518582015283529183019160400162000a3d565b600082601f83011262000a8f57600080fd5b8151602062000aa262000968836200091d565b82815260059290921b8401810191818101908684111562000ac257600080fd5b8286015b84811015620009e95762000ada816200088c565b835291830191830162000ac6565b80518015158114620008a457600080fd5b600080600080600080600080610100898b03121562000b1757600080fd5b62000b22896200088c565b60208a01519098506001600160401b038082111562000b4057600080fd5b62000b4e8c838d0162000943565b985060408b0151975060608b015191508082111562000b6c57600080fd5b62000b7a8c838d01620009f4565b965060808b0151955062000b9160a08c016200088c565b945060c08b015191508082111562000ba857600080fd5b5062000bb78b828c0162000a7d565b92505062000bc860e08a0162000ae8565b90509295985092959890939650565b634e487b7160e01b600052603260045260246000fd5b60006001820162000c025762000c0262000846565b5060010190565b8181038181111562000520576200052062000846565b634e487b7160e01b600052603160045260246000fd5b6130178062000c456000396000f3fe60806040526004361061024a5760003560e01c80638da5cb5b11610139578063dbbb4155116100b6578063e81ea5951161007a578063e81ea5951461075b578063eedc966a14610770578063f2407be214610790578063f2f6bf2a146107bd578063f2fde38b1461080b578063f3ae24151461082b57600080fd5b8063dbbb4155146106b9578063dcd44d71146106d9578063dd31d394146106f9578063e3725b1514610719578063e4d3914a1461073b57600080fd5b8063c2c518e1116100fd578063c2c518e114610622578063c390448214610637578063c84e329e14610657578063c93c48e11461068d578063d6317526146106a357600080fd5b80638da5cb5b1461056357806390889661146105865780639449c655146105c0578063a5e90eee146105e0578063bc7881691461060057600080fd5b806344a34f63116101c7578063786ea0ce1161018b578063786ea0ce1461049d578063832b5491146104ee57806383d853461461050e5780638456cb591461052e57806385572ffb1461054357600080fd5b806344a34f63146103f85780635c975abb146104185780635d2251d5146104305780635e280f1114610450578063715018a61461048857600080fd5b80632f204e811161020e5780632f204e811461035a5780632fac88c01461037a5780633af558c51461039a5780633f4ba83a146103c2578063440d7248146103d757600080fd5b806301ffc9a71461025657806307bce0b41461028b578063093f0e27146102ad5780630a5ec8cc146102ef578063103b73971461030f57600080fd5b3661025157005b600080fd5b34801561026257600080fd5b50610276610271366004612885565b61084b565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102ab6102a63660046128af565b610882565b005b3480156102b957600080fd5b506102e17f22ad9585a395edc8067b50da4778cafbb7fa2c4bbd7619fad6aeba403857fd7481565b604051908152602001610282565b3480156102fb57600080fd5b506102ab61030a3660046128d1565b6108b6565b34801561031b57600080fd5b50600080516020612fc283398151915260005260016020527f3c2285c553468ca8f30447b24bb463c127f1b840e23a0cafa23caa79d906669a546102e1565b34801561036657600080fd5b506102ab6103753660046128ea565b6108ed565b34801561038657600080fd5b506102ab6103953660046129a9565b61095c565b6103ad6103a8366004612a02565b610a18565b60408051928352602083019190915201610282565b3480156103ce57600080fd5b506102ab610cca565b3480156103e357600080fd5b506102766103f2366004612a60565b50600090565b34801561040457600080fd5b506102e1610413366004612a7d565b610d02565b34801561042457600080fd5b5060005460ff16610276565b34801561043c57600080fd5b506102ab61044b366004612a99565b610e12565b34801561045c57600080fd5b50600354610470906001600160a01b031681565b6040516001600160a01b039091168152602001610282565b34801561049457600080fd5b506102ab610e43565b3480156104a957600080fd5b506104d76104b83660046128d1565b6008602052600090815260409020805460019091015460ff9091169082565b604080519215158352602083019190915201610282565b3480156104fa57600080fd5b506102e16105093660046128d1565b610e55565b34801561051a57600080fd5b506102ab610529366004612ada565b610e76565b34801561053a57600080fd5b506102ab610eaf565b34801561054f57600080fd5b506102ab61055e366004612b13565b610ee5565b34801561056f57600080fd5b5060005461010090046001600160a01b0316610470565b34801561059257600080fd5b506104d76105a13660046128d1565b600a602052600090815260409020805460019091015460ff9091169082565b3480156105cc57600080fd5b506102ab6105db3660046128d1565b6112dc565b3480156105ec57600080fd5b506102ab6105fb366004612b5b565b61130b565b34801561060c57600080fd5b50610615611368565b6040516102829190612b89565b34801561062e57600080fd5b506102ab6113c0565b34801561064357600080fd5b506102e16106523660046128d1565b61142d565b34801561066357600080fd5b506104706106723660046128d1565b6006602052600090815260409020546001600160a01b031681565b34801561069957600080fd5b506102e160095481565b3480156106af57600080fd5b506102e1600c5481565b3480156106c557600080fd5b506102ab6106d4366004612a60565b611459565b3480156106e557600080fd5b506102ab6106f43660046128ea565b611488565b34801561070557600080fd5b506102ab6107143660046128d1565b6114f9565b34801561072557600080fd5b5061072e611528565b6040516102829190612bcd565b34801561074757600080fd5b506102ab6107563660046129a9565b611541565b34801561076757600080fd5b506007546102e1565b34801561077c57600080fd5b506102e161078b366004612a60565b6115c0565b34801561079c57600080fd5b506102e16107ab366004612c0e565b60056020526000908152604090205481565b3480156107c957600080fd5b506107f36107d83660046128d1565b6004602052600090815260409020546001600160401b031681565b6040516001600160401b039091168152602001610282565b34801561081757600080fd5b506102ab610826366004612a60565b61165b565b34801561083757600080fd5b50610276610846366004612a60565b6116d6565b60006001600160e01b031982166385572ffb60e01b148061087c57506001600160e01b031982166301ffc9a760e01b145b92915050565b61088b336116d6565b6108a857604051637c3ea23f60e01b815260040160405180910390fd5b6108b28282611716565b5050565b6108bf336116d6565b6108dc57604051637c3ea23f60e01b815260040160405180910390fd5b6108e581611789565b50565b905090565b6108f6336116d6565b61091357604051637c3ea23f60e01b815260040160405180910390fd5b60005b8181101561095757600083838381811061093257610932612c37565b905060200201359050610944816117c5565b508061094f81612c63565b915050610916565b505050565b610965336116d6565b61098257604051637c3ea23f60e01b815260040160405180910390fd5b60005b8181101561095757368383838181106109a0576109a0612c37565b6040908102929092019250508135906000906109c190840160208501612a60565b90504682036109f8576001600160a01b03811630146109f357604051631131ed9760e31b815260040160405180910390fd5b610a02565b610a02828261182c565b5050508080610a1090612c63565b915050610985565b600080610a236118c1565b610a2b611907565b6000610a378635611960565b90506000610a458735611999565b9050610a56873560608901356119cf565b600d8054906000610a6683612c63565b9190505550600d5493506000610a7a6119f8565b9050610a896020880188612c7c565b15610aa357610a9e8133308b60400135611a66565b610afc565b806001600160a01b031663d0e30db089604001356040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ae257600080fd5b505af1158015610af6573d6000803e3d6000fd5b50505050505b600354610b189082906001600160a01b031660408b0135611b61565b60006040518060800160405280878152602001336001600160a01b03168152602001896020016020810190610b4d9190612c7c565b1515815260200160006001600160a01b03168b6020016020810190610b729190612a60565b6001600160a01b031614610b9557610b9060408c0160208d01612a60565b610b97565b335b6001600160a01b03169052604051610bb29190602001612c99565b60405160208183030381529060405290506000610be28483610bd8868e60400135611c53565b8d60600135611cda565b9050610bef85828a611dc0565b600354909650610c0d92508391506001600160a01b03166000611b61565b8333867f5e1afc98752b63a0948ee6b666ac9fa146e1e992b6b31aed4d79d132383a30898b35610c4360408e0160208f01612a60565b610c5060208e018e612c7c565b8d6020016020810190610c639190612c7c565b8f604001358e34610c749190612cd5565b604080519687526001600160a01b03959095166020870152921515858501529015156060850152608084015260a08301524260c0830152519081900360e00190a4505050610cc26001600b55565b935093915050565b610cd3336116d6565b610cf057604051637c3ea23f60e01b815260040160405180910390fd5b610cf8611e5a565b610d00611ea3565b565b600080610d0f8335611960565b90506000610d1d8435611999565b9050610d2e843560608601356119cf565b60006040518060800160405280600d546001610d4a9190612ce8565b8152602001336001600160a01b0316815260200160011515815260200160006001600160a01b0316876020016020810190610d859190612a60565b6001600160a01b031614610da857610da36040880160208901612a60565b610daa565b335b6001600160a01b03169052604051610dc59190602001612c99565b60405160208183030381529060405290506000610dfc8383610df2610de86119f8565b8a60400135611c53565b8960600135611cda565b9050610e088482611ef5565b9695505050505050565b610e1b336116d6565b610e3857604051637c3ea23f60e01b815260040160405180910390fd5b610957838383611f70565b610e4b611faa565b610d00600061200a565b60078181548110610e6557600080fd5b600091825260209091200154905081565b610e7f336116d6565b610e9c57604051637c3ea23f60e01b815260040160405180910390fd5b6108b28282610eaa856115c0565b611f70565b610eb8336116d6565b610ed557604051637c3ea23f60e01b815260040160405180910390fd5b610edd6118c1565b610d00612063565b610eed611907565b6003546001600160a01b03163314610f185760405163d9b0b35560e01b815260040160405180910390fd5b60005460ff1615610f51576040517febfa14817ead60a20b8a0fc2f6e70025b7414b60eeb0f786c0446e7e543db64b90600090a16112d2565b6000600581610f666040850160208601612c0e565b6001600160401b03166001600160401b031681526020019081526020016000205490506000828060400190610f9b9190612cfb565b810190610fa89190612a60565b905060008215801590610fc357506001600160a01b03821615155b8015610fe857506000838152600660205260409020546001600160a01b038381169116145b90508061102d576040516001600160a01b0383169084907fac80426faf130d4151e14cb1e038276f673086f5fc3dd98833115986676840cf90600090a35050506112d2565b60006110376119f8565b90506110466080860186612d41565b9050600114158061109c57506001600160a01b0381166110696080870187612d41565b600081811061107a5761107a612c37565b6110909260206040909202019081019150612a60565b6001600160a01b031614155b156110d3576040517f059a1c5131f929faf5414939857c4e1750baf6110d2cbb9b066c50d7be32185590600090a1505050506112d2565b60006110e26060870187612cfb565b8101906110ef9190612d8a565b905060006111006080880188612d41565b600081811061111157611111612c37565b905060400201602001359050600082604001511561113d57611138848460600151846120a0565b61127e565b604051632e1a7d4d60e01b8152600481018390526001600160a01b03851690632e1a7d4d90602401600060405180830381600087803b15801561117f57600080fd5b505af1158015611193573d6000803e3d6000fd5b505050506000600c546000146111ab57600c546111af565b6000195b9050600084606001516001600160a01b0316848390604051600060405180830381858888f193505050503d8060008114611205576040519150601f19603f3d011682016040523d82523d6000602084013e61120a565b606091505b505090508061127b57856001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561124e57600080fd5b505af1158015611262573d6000803e3d6000fd5b5050505050611276868660600151866120a0565b600192505b50505b8251604080850151815190151581528315156020820152428183015290518992917f1022ec43e39d2bfc3f0835b4bd448d7c8ac069ed5d55e3a5ec1a8faf541cec64919081900360600190a3505050505050505b6108e56001600b55565b6112e5336116d6565b61130257604051637c3ea23f60e01b815260040160405180910390fd5b6108e58161218a565b611313611faa565b61132c600080516020612fc283398151915283836121d8565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b606060078054806020026020016040519081016040528092919081815260200182805480156113b657602002820191906000526020600020905b8154815260200190600101908083116113a2575b5050505050905090565b6113c9336116d6565b6113e657604051637c3ea23f60e01b815260040160405180910390fd5b611400600080516020612fc28339815191523360006121d8565b60405133907f6cc2c67081f55c2fffb7c008fa995fbbf890f48c7c16fba93d8220f00dc84cc590600090a2565b6000818152600a60205260408120805460ff161561144f576001015492915050565b5050600954919050565b611462336116d6565b61147f57604051637c3ea23f60e01b815260040160405180910390fd5b6108e581612205565b611491336116d6565b6114ae57604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109575760008383838181106114cd576114cd612c37565b9050602002013590504681146114e6576114e681612258565b50806114f181612c63565b9150506114b1565b611502336116d6565b61151f57604051637c3ea23f60e01b815260040160405180910390fd5b6108e5816122b7565b60606108e8600080516020612fc28339815191526122ec565b61154a336116d6565b61156757604051637c3ea23f60e01b815260040160405180910390fd5b60005b81811015610957573683838381811061158557611585612c37565b90506040020190506115ad81600001358260200160208101906115a89190612c0e565b612358565b50806115b881612c63565b91505061156a565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038316016115ee575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015611632573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087c9190612e13565b919050565b611663611faa565b6001600160a01b0381166116cd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6108e58161200a565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff1661087c565b604080518082018252600180825260208083018581526000878152600a83528590209351845460ff191690151517845551929091019190915581518481529081018390527f2ee636de87a5f853f736b571d71f38b0eaa7a494ab78d545a4e69975fb3a0e3f910160405180910390a15050565b600c8190556040518181527f07f2da272b0090c4177cfbb7f50d00e3ed4d37c9445216ca7efbc245d7b5b0ac906020015b60405180910390a150565b6000818152600460209081526040808320805467ffffffffffffffff1981169091556001600160401b03168084526005909252808320839055519091829184917ff3f561aeedc0eb6a38a4fcd9b5b5e3ad2a52f68ccfb161f3ce56a6df1aeb4a6d91a35050565b8160000361184d576040516381e7376360e01b815260040160405180910390fd5b6001600160a01b03811661187457604051633efa09af60e01b815260040160405180910390fd5b611886600660076008858560646123c1565b506040516001600160a01b0382169083907f357d1ebd1dc0d53cc15161206b9a39c9ca30667bd997cf921eb00e4c78a454f590600090a35050565b60005460ff1615610d005760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016116c4565b6002600b54036119595760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016116c4565b6002600b55565b6000818152600460205260408120546001600160401b031690819003611656576040516324efd8bd60e01b815260040160405180910390fd5b6000818152600660205260408120546001600160a01b03168061087c57604051631a81634560e01b815260040160405180910390fd5b6119d88261142d565b8110156108b257604051630acdd10560e31b815260040160405180910390fd5b6003546040805163e861e90760e01b815290516000926001600160a01b03169163e861e9079160048083019260209291908290030181865afa158015611a42573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e89190612e2c565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691611aca9190612e6d565b6000604051808303816000865af19150503d8060008114611b07576040519150601f19603f3d011682016040523d82523d6000602084013e611b0c565b606091505b50915091506000828015611b38575081511580611b38575081806020019051810190611b389190612e89565b905080611b5857604051632d9d5b4160e01b815260040160405180910390fd5b50505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b1790529151600092839290871691611bbd9190612e6d565b6000604051808303816000865af19150503d8060008114611bfa576040519150601f19603f3d011682016040523d82523d6000602084013e611bff565b606091505b50915091506000828015611c2b575081511580611c2b575081806020019051810190611c2b9190612e89565b905080611c4b5760405163b45d44e760e01b815260040160405180910390fd5b505050505050565b60408051600180825281830190925260609160009190816020015b6040805180820190915260008082526020820152815260200190600190039081611c6e5790505090506040518060400160405280856001600160a01b031681526020018481525081600081518110611cc857611cc8612c37565b60209081029190910101529392505050565b611d156040518060a0016040528060608152602001606081526020016060815260200160006001600160a01b03168152602001606081525090565b6040805160a081019091526001600160a01b03861660c08201528060e08101604051602081830303815290604052815260200185815260200184815260200160006001600160a01b03168152602001611db360405180602001604052808681525060408051915160248084019190915281518084039091018152604490920190526020810180516001600160e01b03166397a657c960e01b17905290565b905290505b949350505050565b600081341015611de35760405163015523f960e71b815260040160405180910390fd5b6003546040516396f4e9f960e01b81526001600160a01b03909116906396f4e9f9908490611e179088908890600401612ed2565b60206040518083038185885af1158015611e35573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611db89190612e13565b60005460ff16610d005760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016116c4565b611eab611e5a565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6003546040516320487ded60e01b81526000916001600160a01b0316906320487ded90611f289086908690600401612ed2565b602060405180830381865afa158015611f45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f699190612e13565b9392505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601611f9f57610957828261241d565b6109578383836120a0565b6000546001600160a01b03610100909104163314610d005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016116c4565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b61206b6118c1565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ed83390565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916120fc9190612e6d565b6000604051808303816000865af19150503d8060008114612139576040519150601f19603f3d011682016040523d82523d6000602084013e61213e565b606091505b5091509150600082801561216a57508151158061216a57508180602001905181019061216a9190612e89565b905080611c4b57604051632fdb1b7f60e11b815260040160405180910390fd5b6000818152600a6020526040808220805460ff1916815560010191909155517f2449b10e63f8d71e042b39939d3c5423f003860c5371eb09ecfd7435d681a78e906117ba9083815260200190565b600083815260016020908152604080832060029092529091206121ff9190848460646124ab565b50505050565b61220e816124ce565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fc8e81a4efc849969069ec6aae575cf7a6bc5f9d3abac59f4ed190a6f7e05fc6f90600090a250565b80600003612279576040516381e7376360e01b815260040160405180910390fd5b61228860066007600884612501565b5060405181907feb39225b53386d0eb02af9cf2c6b6a0c345a97654f1e67fb21b0b5aaac81ec4a90600090a250565b60098190556040518181527f7d13ea4e82ca085561ddd42a2f1080d88b527444721ee7803f603decd203ff23906020016117ba565b60008181526001602090815260409182902080548351818402810184019094528084526060939283018282801561234c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161232e575b50505050509050919050565b6000828152600460209081526040808320805467ffffffffffffffff19166001600160401b038616908117909155808452600590925280832085905551909184917ff8ee8bf96f2e1a5ac4438005dc0c9020d64a0b189f2629046a44cbbe2f5a42eb9190a35050565b60008381526020859052604090205460ff161580156123e8576123e686868685612549565b505b600093845260209690965250604090912080546001600160a01b0319166001600160a01b039092169190911790555090919050565b604080516000808252602082019092526001600160a01b0384169083906040516124479190612e6d565b60006040518083038185875af1925050503d8060008114612484576040519150601f19603f3d011682016040523d82523d6000602084013e612489565b606091505b505090508061095757604051632e05b05360e21b815260040160405180910390fd5b6000826124c2576124bd8686866125d2565b610e08565b610e08868686856126fa565b6001600160a01b0381163b6108e557604051638c50d7cd60e01b81526001600160a01b03821660048201526024016116c4565b60008181526020839052604090205460ff168015611db857600082815260208690526040902080546001600160a01b03191690556125408484846127aa565b50949350505050565b60008281526020849052604090205460ff16158015611db857845482116125835760405163b1655e3360e01b815260040160405180910390fd5b60408051808201825260018082528754602080840191825260008881529881529388209251835460ff191690151517835551918101919091558654908101875595855290932090930155919050565b6001600160a01b0381166000908152602083905260409020805460ff169081156126f2576001808201548654909160009161260d9190612cd5565b905080821461269a57600087828154811061262a5761262a612c37565b9060005260206000200160009054906101000a90046001600160a01b031690508088848154811061265d5761265d612c37565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b868054806126aa576126aa612fab565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff16158015611db8578454821161273e5760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b039790971660008181529888529388209251835460ff19169015151783555191810191909155865490810187559585529290932090930180546001600160a01b0319169091179055919050565b6000818152602083905260409020805460ff169081156126f257600180820154865490916000916127db9190612cd5565b905080821461283a5760008782815481106127f8576127f8612c37565b906000526020600020015490508088848154811061281857612818612c37565b6000918252602080832090910192909255918252879052604090206001018290555b8680548061284a5761284a612fab565b60008281526020808220830160001990810183905590920190925586825287905260408120805460ff19168155600101555050509392505050565b60006020828403121561289757600080fd5b81356001600160e01b031981168114611f6957600080fd5b600080604083850312156128c257600080fd5b50508035926020909101359150565b6000602082840312156128e357600080fd5b5035919050565b600080602083850312156128fd57600080fd5b82356001600160401b038082111561291457600080fd5b818501915085601f83011261292857600080fd5b81358181111561293757600080fd5b8660208260051b850101111561294c57600080fd5b60209290920196919550909350505050565b60008083601f84011261297057600080fd5b5081356001600160401b0381111561298757600080fd5b6020830191508360208260061b85010111156129a257600080fd5b9250929050565b600080602083850312156129bc57600080fd5b82356001600160401b038111156129d257600080fd5b6129de8582860161295e565b90969095509350505050565b6000608082840312156129fc57600080fd5b50919050565b600080600083850360e0811215612a1857600080fd5b612a2286866129ea565b93506040607f1982011215612a3657600080fd5b5060808401915060c084013590509250925092565b6001600160a01b03811681146108e557600080fd5b600060208284031215612a7257600080fd5b8135611f6981612a4b565b600060808284031215612a8f57600080fd5b611f6983836129ea565b600080600060608486031215612aae57600080fd5b8335612ab981612a4b565b92506020840135612ac981612a4b565b929592945050506040919091013590565b60008060408385031215612aed57600080fd5b8235612af881612a4b565b91506020830135612b0881612a4b565b809150509250929050565b600060208284031215612b2557600080fd5b81356001600160401b03811115612b3b57600080fd5b820160a08185031215611f6957600080fd5b80151581146108e557600080fd5b60008060408385031215612b6e57600080fd5b8235612b7981612a4b565b91506020830135612b0881612b4d565b6020808252825182820181905260009190848201906040850190845b81811015612bc157835183529284019291840191600101612ba5565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612bc15783516001600160a01b031683529284019291840191600101612be9565b600060208284031215612c2057600080fd5b81356001600160401b0381168114611f6957600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612c7557612c75612c4d565b5060010190565b600060208284031215612c8e57600080fd5b8135611f6981612b4d565b815181526020808301516001600160a01b0390811691830191909152604080840151151590830152606092830151169181019190915260800190565b8181038181111561087c5761087c612c4d565b8082018082111561087c5761087c612c4d565b6000808335601e19843603018112612d1257600080fd5b8301803591506001600160401b03821115612d2c57600080fd5b6020019150368190038213156129a257600080fd5b6000808335601e19843603018112612d5857600080fd5b8301803591506001600160401b03821115612d7257600080fd5b6020019150600681901b36038213156129a257600080fd5b600060808284031215612d9c57600080fd5b604051608081018181106001600160401b0382111715612dcc57634e487b7160e01b600052604160045260246000fd5b604052823581526020830135612de181612a4b565b60208201526040830135612df481612b4d565b60408201526060830135612e0781612a4b565b60608201529392505050565b600060208284031215612e2557600080fd5b5051919050565b600060208284031215612e3e57600080fd5b8151611f6981612a4b565b60005b83811015612e64578181015183820152602001612e4c565b50506000910152565b60008251612e7f818460208701612e49565b9190910192915050565b600060208284031215612e9b57600080fd5b8151611f6981612b4d565b60008151808452612ebe816020860160208601612e49565b601f01601f19169290920160200192915050565b600060406001600160401b038516835260208181850152845160a083860152612efe60e0860182612ea6565b905081860151603f1980878403016060880152612f1b8383612ea6565b88860151888203830160808a01528051808352908601945060009350908501905b80841015612f6e57845180516001600160a01b0316835286015186830152938501936001939093019290860190612f3c565b5060608901516001600160a01b031660a08901526080890151888203830160c08a01529550612f9d8187612ea6565b9a9950505050505050505050565b634e487b7160e01b600052603160045260246000fdfe6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6fa264697066735822122023f62fed31e3ddd0beb4df99592fbd8cceca1e9f9441d172112dd600c1a2158364736f6c634300081300330000000000000000000000003206695cae29952f4b0c22a169725a865bc8ce0f0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001d4c000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000300c00000000000000000000000072e28c7f34100afefc399fcc0ae041b8fe5841ae000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000045849994fc9c7b15000000000000000000000000000000000000000000000000000000000000a4b100000000000000000000000000000000000000000000000044ae84d8e9a37444000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000033d343f77863cab800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061024a5760003560e01c80638da5cb5b11610139578063dbbb4155116100b6578063e81ea5951161007a578063e81ea5951461075b578063eedc966a14610770578063f2407be214610790578063f2f6bf2a146107bd578063f2fde38b1461080b578063f3ae24151461082b57600080fd5b8063dbbb4155146106b9578063dcd44d71146106d9578063dd31d394146106f9578063e3725b1514610719578063e4d3914a1461073b57600080fd5b8063c2c518e1116100fd578063c2c518e114610622578063c390448214610637578063c84e329e14610657578063c93c48e11461068d578063d6317526146106a357600080fd5b80638da5cb5b1461056357806390889661146105865780639449c655146105c0578063a5e90eee146105e0578063bc7881691461060057600080fd5b806344a34f63116101c7578063786ea0ce1161018b578063786ea0ce1461049d578063832b5491146104ee57806383d853461461050e5780638456cb591461052e57806385572ffb1461054357600080fd5b806344a34f63146103f85780635c975abb146104185780635d2251d5146104305780635e280f1114610450578063715018a61461048857600080fd5b80632f204e811161020e5780632f204e811461035a5780632fac88c01461037a5780633af558c51461039a5780633f4ba83a146103c2578063440d7248146103d757600080fd5b806301ffc9a71461025657806307bce0b41461028b578063093f0e27146102ad5780630a5ec8cc146102ef578063103b73971461030f57600080fd5b3661025157005b600080fd5b34801561026257600080fd5b50610276610271366004612885565b61084b565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102ab6102a63660046128af565b610882565b005b3480156102b957600080fd5b506102e17f22ad9585a395edc8067b50da4778cafbb7fa2c4bbd7619fad6aeba403857fd7481565b604051908152602001610282565b3480156102fb57600080fd5b506102ab61030a3660046128d1565b6108b6565b34801561031b57600080fd5b50600080516020612fc283398151915260005260016020527f3c2285c553468ca8f30447b24bb463c127f1b840e23a0cafa23caa79d906669a546102e1565b34801561036657600080fd5b506102ab6103753660046128ea565b6108ed565b34801561038657600080fd5b506102ab6103953660046129a9565b61095c565b6103ad6103a8366004612a02565b610a18565b60408051928352602083019190915201610282565b3480156103ce57600080fd5b506102ab610cca565b3480156103e357600080fd5b506102766103f2366004612a60565b50600090565b34801561040457600080fd5b506102e1610413366004612a7d565b610d02565b34801561042457600080fd5b5060005460ff16610276565b34801561043c57600080fd5b506102ab61044b366004612a99565b610e12565b34801561045c57600080fd5b50600354610470906001600160a01b031681565b6040516001600160a01b039091168152602001610282565b34801561049457600080fd5b506102ab610e43565b3480156104a957600080fd5b506104d76104b83660046128d1565b6008602052600090815260409020805460019091015460ff9091169082565b604080519215158352602083019190915201610282565b3480156104fa57600080fd5b506102e16105093660046128d1565b610e55565b34801561051a57600080fd5b506102ab610529366004612ada565b610e76565b34801561053a57600080fd5b506102ab610eaf565b34801561054f57600080fd5b506102ab61055e366004612b13565b610ee5565b34801561056f57600080fd5b5060005461010090046001600160a01b0316610470565b34801561059257600080fd5b506104d76105a13660046128d1565b600a602052600090815260409020805460019091015460ff9091169082565b3480156105cc57600080fd5b506102ab6105db3660046128d1565b6112dc565b3480156105ec57600080fd5b506102ab6105fb366004612b5b565b61130b565b34801561060c57600080fd5b50610615611368565b6040516102829190612b89565b34801561062e57600080fd5b506102ab6113c0565b34801561064357600080fd5b506102e16106523660046128d1565b61142d565b34801561066357600080fd5b506104706106723660046128d1565b6006602052600090815260409020546001600160a01b031681565b34801561069957600080fd5b506102e160095481565b3480156106af57600080fd5b506102e1600c5481565b3480156106c557600080fd5b506102ab6106d4366004612a60565b611459565b3480156106e557600080fd5b506102ab6106f43660046128ea565b611488565b34801561070557600080fd5b506102ab6107143660046128d1565b6114f9565b34801561072557600080fd5b5061072e611528565b6040516102829190612bcd565b34801561074757600080fd5b506102ab6107563660046129a9565b611541565b34801561076757600080fd5b506007546102e1565b34801561077c57600080fd5b506102e161078b366004612a60565b6115c0565b34801561079c57600080fd5b506102e16107ab366004612c0e565b60056020526000908152604090205481565b3480156107c957600080fd5b506107f36107d83660046128d1565b6004602052600090815260409020546001600160401b031681565b6040516001600160401b039091168152602001610282565b34801561081757600080fd5b506102ab610826366004612a60565b61165b565b34801561083757600080fd5b50610276610846366004612a60565b6116d6565b60006001600160e01b031982166385572ffb60e01b148061087c57506001600160e01b031982166301ffc9a760e01b145b92915050565b61088b336116d6565b6108a857604051637c3ea23f60e01b815260040160405180910390fd5b6108b28282611716565b5050565b6108bf336116d6565b6108dc57604051637c3ea23f60e01b815260040160405180910390fd5b6108e581611789565b50565b905090565b6108f6336116d6565b61091357604051637c3ea23f60e01b815260040160405180910390fd5b60005b8181101561095757600083838381811061093257610932612c37565b905060200201359050610944816117c5565b508061094f81612c63565b915050610916565b505050565b610965336116d6565b61098257604051637c3ea23f60e01b815260040160405180910390fd5b60005b8181101561095757368383838181106109a0576109a0612c37565b6040908102929092019250508135906000906109c190840160208501612a60565b90504682036109f8576001600160a01b03811630146109f357604051631131ed9760e31b815260040160405180910390fd5b610a02565b610a02828261182c565b5050508080610a1090612c63565b915050610985565b600080610a236118c1565b610a2b611907565b6000610a378635611960565b90506000610a458735611999565b9050610a56873560608901356119cf565b600d8054906000610a6683612c63565b9190505550600d5493506000610a7a6119f8565b9050610a896020880188612c7c565b15610aa357610a9e8133308b60400135611a66565b610afc565b806001600160a01b031663d0e30db089604001356040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ae257600080fd5b505af1158015610af6573d6000803e3d6000fd5b50505050505b600354610b189082906001600160a01b031660408b0135611b61565b60006040518060800160405280878152602001336001600160a01b03168152602001896020016020810190610b4d9190612c7c565b1515815260200160006001600160a01b03168b6020016020810190610b729190612a60565b6001600160a01b031614610b9557610b9060408c0160208d01612a60565b610b97565b335b6001600160a01b03169052604051610bb29190602001612c99565b60405160208183030381529060405290506000610be28483610bd8868e60400135611c53565b8d60600135611cda565b9050610bef85828a611dc0565b600354909650610c0d92508391506001600160a01b03166000611b61565b8333867f5e1afc98752b63a0948ee6b666ac9fa146e1e992b6b31aed4d79d132383a30898b35610c4360408e0160208f01612a60565b610c5060208e018e612c7c565b8d6020016020810190610c639190612c7c565b8f604001358e34610c749190612cd5565b604080519687526001600160a01b03959095166020870152921515858501529015156060850152608084015260a08301524260c0830152519081900360e00190a4505050610cc26001600b55565b935093915050565b610cd3336116d6565b610cf057604051637c3ea23f60e01b815260040160405180910390fd5b610cf8611e5a565b610d00611ea3565b565b600080610d0f8335611960565b90506000610d1d8435611999565b9050610d2e843560608601356119cf565b60006040518060800160405280600d546001610d4a9190612ce8565b8152602001336001600160a01b0316815260200160011515815260200160006001600160a01b0316876020016020810190610d859190612a60565b6001600160a01b031614610da857610da36040880160208901612a60565b610daa565b335b6001600160a01b03169052604051610dc59190602001612c99565b60405160208183030381529060405290506000610dfc8383610df2610de86119f8565b8a60400135611c53565b8960600135611cda565b9050610e088482611ef5565b9695505050505050565b610e1b336116d6565b610e3857604051637c3ea23f60e01b815260040160405180910390fd5b610957838383611f70565b610e4b611faa565b610d00600061200a565b60078181548110610e6557600080fd5b600091825260209091200154905081565b610e7f336116d6565b610e9c57604051637c3ea23f60e01b815260040160405180910390fd5b6108b28282610eaa856115c0565b611f70565b610eb8336116d6565b610ed557604051637c3ea23f60e01b815260040160405180910390fd5b610edd6118c1565b610d00612063565b610eed611907565b6003546001600160a01b03163314610f185760405163d9b0b35560e01b815260040160405180910390fd5b60005460ff1615610f51576040517febfa14817ead60a20b8a0fc2f6e70025b7414b60eeb0f786c0446e7e543db64b90600090a16112d2565b6000600581610f666040850160208601612c0e565b6001600160401b03166001600160401b031681526020019081526020016000205490506000828060400190610f9b9190612cfb565b810190610fa89190612a60565b905060008215801590610fc357506001600160a01b03821615155b8015610fe857506000838152600660205260409020546001600160a01b038381169116145b90508061102d576040516001600160a01b0383169084907fac80426faf130d4151e14cb1e038276f673086f5fc3dd98833115986676840cf90600090a35050506112d2565b60006110376119f8565b90506110466080860186612d41565b9050600114158061109c57506001600160a01b0381166110696080870187612d41565b600081811061107a5761107a612c37565b6110909260206040909202019081019150612a60565b6001600160a01b031614155b156110d3576040517f059a1c5131f929faf5414939857c4e1750baf6110d2cbb9b066c50d7be32185590600090a1505050506112d2565b60006110e26060870187612cfb565b8101906110ef9190612d8a565b905060006111006080880188612d41565b600081811061111157611111612c37565b905060400201602001359050600082604001511561113d57611138848460600151846120a0565b61127e565b604051632e1a7d4d60e01b8152600481018390526001600160a01b03851690632e1a7d4d90602401600060405180830381600087803b15801561117f57600080fd5b505af1158015611193573d6000803e3d6000fd5b505050506000600c546000146111ab57600c546111af565b6000195b9050600084606001516001600160a01b0316848390604051600060405180830381858888f193505050503d8060008114611205576040519150601f19603f3d011682016040523d82523d6000602084013e61120a565b606091505b505090508061127b57856001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561124e57600080fd5b505af1158015611262573d6000803e3d6000fd5b5050505050611276868660600151866120a0565b600192505b50505b8251604080850151815190151581528315156020820152428183015290518992917f1022ec43e39d2bfc3f0835b4bd448d7c8ac069ed5d55e3a5ec1a8faf541cec64919081900360600190a3505050505050505b6108e56001600b55565b6112e5336116d6565b61130257604051637c3ea23f60e01b815260040160405180910390fd5b6108e58161218a565b611313611faa565b61132c600080516020612fc283398151915283836121d8565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b606060078054806020026020016040519081016040528092919081815260200182805480156113b657602002820191906000526020600020905b8154815260200190600101908083116113a2575b5050505050905090565b6113c9336116d6565b6113e657604051637c3ea23f60e01b815260040160405180910390fd5b611400600080516020612fc28339815191523360006121d8565b60405133907f6cc2c67081f55c2fffb7c008fa995fbbf890f48c7c16fba93d8220f00dc84cc590600090a2565b6000818152600a60205260408120805460ff161561144f576001015492915050565b5050600954919050565b611462336116d6565b61147f57604051637c3ea23f60e01b815260040160405180910390fd5b6108e581612205565b611491336116d6565b6114ae57604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109575760008383838181106114cd576114cd612c37565b9050602002013590504681146114e6576114e681612258565b50806114f181612c63565b9150506114b1565b611502336116d6565b61151f57604051637c3ea23f60e01b815260040160405180910390fd5b6108e5816122b7565b60606108e8600080516020612fc28339815191526122ec565b61154a336116d6565b61156757604051637c3ea23f60e01b815260040160405180910390fd5b60005b81811015610957573683838381811061158557611585612c37565b90506040020190506115ad81600001358260200160208101906115a89190612c0e565b612358565b50806115b881612c63565b91505061156a565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038316016115ee575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015611632573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087c9190612e13565b919050565b611663611faa565b6001600160a01b0381166116cd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6108e58161200a565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff1661087c565b604080518082018252600180825260208083018581526000878152600a83528590209351845460ff191690151517845551929091019190915581518481529081018390527f2ee636de87a5f853f736b571d71f38b0eaa7a494ab78d545a4e69975fb3a0e3f910160405180910390a15050565b600c8190556040518181527f07f2da272b0090c4177cfbb7f50d00e3ed4d37c9445216ca7efbc245d7b5b0ac906020015b60405180910390a150565b6000818152600460209081526040808320805467ffffffffffffffff1981169091556001600160401b03168084526005909252808320839055519091829184917ff3f561aeedc0eb6a38a4fcd9b5b5e3ad2a52f68ccfb161f3ce56a6df1aeb4a6d91a35050565b8160000361184d576040516381e7376360e01b815260040160405180910390fd5b6001600160a01b03811661187457604051633efa09af60e01b815260040160405180910390fd5b611886600660076008858560646123c1565b506040516001600160a01b0382169083907f357d1ebd1dc0d53cc15161206b9a39c9ca30667bd997cf921eb00e4c78a454f590600090a35050565b60005460ff1615610d005760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016116c4565b6002600b54036119595760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016116c4565b6002600b55565b6000818152600460205260408120546001600160401b031690819003611656576040516324efd8bd60e01b815260040160405180910390fd5b6000818152600660205260408120546001600160a01b03168061087c57604051631a81634560e01b815260040160405180910390fd5b6119d88261142d565b8110156108b257604051630acdd10560e31b815260040160405180910390fd5b6003546040805163e861e90760e01b815290516000926001600160a01b03169163e861e9079160048083019260209291908290030181865afa158015611a42573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e89190612e2c565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691611aca9190612e6d565b6000604051808303816000865af19150503d8060008114611b07576040519150601f19603f3d011682016040523d82523d6000602084013e611b0c565b606091505b50915091506000828015611b38575081511580611b38575081806020019051810190611b389190612e89565b905080611b5857604051632d9d5b4160e01b815260040160405180910390fd5b50505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b1790529151600092839290871691611bbd9190612e6d565b6000604051808303816000865af19150503d8060008114611bfa576040519150601f19603f3d011682016040523d82523d6000602084013e611bff565b606091505b50915091506000828015611c2b575081511580611c2b575081806020019051810190611c2b9190612e89565b905080611c4b5760405163b45d44e760e01b815260040160405180910390fd5b505050505050565b60408051600180825281830190925260609160009190816020015b6040805180820190915260008082526020820152815260200190600190039081611c6e5790505090506040518060400160405280856001600160a01b031681526020018481525081600081518110611cc857611cc8612c37565b60209081029190910101529392505050565b611d156040518060a0016040528060608152602001606081526020016060815260200160006001600160a01b03168152602001606081525090565b6040805160a081019091526001600160a01b03861660c08201528060e08101604051602081830303815290604052815260200185815260200184815260200160006001600160a01b03168152602001611db360405180602001604052808681525060408051915160248084019190915281518084039091018152604490920190526020810180516001600160e01b03166397a657c960e01b17905290565b905290505b949350505050565b600081341015611de35760405163015523f960e71b815260040160405180910390fd5b6003546040516396f4e9f960e01b81526001600160a01b03909116906396f4e9f9908490611e179088908890600401612ed2565b60206040518083038185885af1158015611e35573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611db89190612e13565b60005460ff16610d005760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016116c4565b611eab611e5a565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6003546040516320487ded60e01b81526000916001600160a01b0316906320487ded90611f289086908690600401612ed2565b602060405180830381865afa158015611f45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f699190612e13565b9392505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601611f9f57610957828261241d565b6109578383836120a0565b6000546001600160a01b03610100909104163314610d005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016116c4565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b61206b6118c1565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ed83390565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916120fc9190612e6d565b6000604051808303816000865af19150503d8060008114612139576040519150601f19603f3d011682016040523d82523d6000602084013e61213e565b606091505b5091509150600082801561216a57508151158061216a57508180602001905181019061216a9190612e89565b905080611c4b57604051632fdb1b7f60e11b815260040160405180910390fd5b6000818152600a6020526040808220805460ff1916815560010191909155517f2449b10e63f8d71e042b39939d3c5423f003860c5371eb09ecfd7435d681a78e906117ba9083815260200190565b600083815260016020908152604080832060029092529091206121ff9190848460646124ab565b50505050565b61220e816124ce565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fc8e81a4efc849969069ec6aae575cf7a6bc5f9d3abac59f4ed190a6f7e05fc6f90600090a250565b80600003612279576040516381e7376360e01b815260040160405180910390fd5b61228860066007600884612501565b5060405181907feb39225b53386d0eb02af9cf2c6b6a0c345a97654f1e67fb21b0b5aaac81ec4a90600090a250565b60098190556040518181527f7d13ea4e82ca085561ddd42a2f1080d88b527444721ee7803f603decd203ff23906020016117ba565b60008181526001602090815260409182902080548351818402810184019094528084526060939283018282801561234c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161232e575b50505050509050919050565b6000828152600460209081526040808320805467ffffffffffffffff19166001600160401b038616908117909155808452600590925280832085905551909184917ff8ee8bf96f2e1a5ac4438005dc0c9020d64a0b189f2629046a44cbbe2f5a42eb9190a35050565b60008381526020859052604090205460ff161580156123e8576123e686868685612549565b505b600093845260209690965250604090912080546001600160a01b0319166001600160a01b039092169190911790555090919050565b604080516000808252602082019092526001600160a01b0384169083906040516124479190612e6d565b60006040518083038185875af1925050503d8060008114612484576040519150601f19603f3d011682016040523d82523d6000602084013e612489565b606091505b505090508061095757604051632e05b05360e21b815260040160405180910390fd5b6000826124c2576124bd8686866125d2565b610e08565b610e08868686856126fa565b6001600160a01b0381163b6108e557604051638c50d7cd60e01b81526001600160a01b03821660048201526024016116c4565b60008181526020839052604090205460ff168015611db857600082815260208690526040902080546001600160a01b03191690556125408484846127aa565b50949350505050565b60008281526020849052604090205460ff16158015611db857845482116125835760405163b1655e3360e01b815260040160405180910390fd5b60408051808201825260018082528754602080840191825260008881529881529388209251835460ff191690151517835551918101919091558654908101875595855290932090930155919050565b6001600160a01b0381166000908152602083905260409020805460ff169081156126f2576001808201548654909160009161260d9190612cd5565b905080821461269a57600087828154811061262a5761262a612c37565b9060005260206000200160009054906101000a90046001600160a01b031690508088848154811061265d5761265d612c37565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b868054806126aa576126aa612fab565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff16158015611db8578454821161273e5760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b039790971660008181529888529388209251835460ff19169015151783555191810191909155865490810187559585529290932090930180546001600160a01b0319169091179055919050565b6000818152602083905260409020805460ff169081156126f257600180820154865490916000916127db9190612cd5565b905080821461283a5760008782815481106127f8576127f8612c37565b906000526020600020015490508088848154811061281857612818612c37565b6000918252602080832090910192909255918252879052604090206001018290555b8680548061284a5761284a612fab565b60008281526020808220830160001990810183905590920190925586825287905260408120805460ff19168155600101555050509392505050565b60006020828403121561289757600080fd5b81356001600160e01b031981168114611f6957600080fd5b600080604083850312156128c257600080fd5b50508035926020909101359150565b6000602082840312156128e357600080fd5b5035919050565b600080602083850312156128fd57600080fd5b82356001600160401b038082111561291457600080fd5b818501915085601f83011261292857600080fd5b81358181111561293757600080fd5b8660208260051b850101111561294c57600080fd5b60209290920196919550909350505050565b60008083601f84011261297057600080fd5b5081356001600160401b0381111561298757600080fd5b6020830191508360208260061b85010111156129a257600080fd5b9250929050565b600080602083850312156129bc57600080fd5b82356001600160401b038111156129d257600080fd5b6129de8582860161295e565b90969095509350505050565b6000608082840312156129fc57600080fd5b50919050565b600080600083850360e0811215612a1857600080fd5b612a2286866129ea565b93506040607f1982011215612a3657600080fd5b5060808401915060c084013590509250925092565b6001600160a01b03811681146108e557600080fd5b600060208284031215612a7257600080fd5b8135611f6981612a4b565b600060808284031215612a8f57600080fd5b611f6983836129ea565b600080600060608486031215612aae57600080fd5b8335612ab981612a4b565b92506020840135612ac981612a4b565b929592945050506040919091013590565b60008060408385031215612aed57600080fd5b8235612af881612a4b565b91506020830135612b0881612a4b565b809150509250929050565b600060208284031215612b2557600080fd5b81356001600160401b03811115612b3b57600080fd5b820160a08185031215611f6957600080fd5b80151581146108e557600080fd5b60008060408385031215612b6e57600080fd5b8235612b7981612a4b565b91506020830135612b0881612b4d565b6020808252825182820181905260009190848201906040850190845b81811015612bc157835183529284019291840191600101612ba5565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612bc15783516001600160a01b031683529284019291840191600101612be9565b600060208284031215612c2057600080fd5b81356001600160401b0381168114611f6957600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612c7557612c75612c4d565b5060010190565b600060208284031215612c8e57600080fd5b8135611f6981612b4d565b815181526020808301516001600160a01b0390811691830191909152604080840151151590830152606092830151169181019190915260800190565b8181038181111561087c5761087c612c4d565b8082018082111561087c5761087c612c4d565b6000808335601e19843603018112612d1257600080fd5b8301803591506001600160401b03821115612d2c57600080fd5b6020019150368190038213156129a257600080fd5b6000808335601e19843603018112612d5857600080fd5b8301803591506001600160401b03821115612d7257600080fd5b6020019150600681901b36038213156129a257600080fd5b600060808284031215612d9c57600080fd5b604051608081018181106001600160401b0382111715612dcc57634e487b7160e01b600052604160045260246000fd5b604052823581526020830135612de181612a4b565b60208201526040830135612df481612b4d565b60408201526060830135612e0781612a4b565b60608201529392505050565b600060208284031215612e2557600080fd5b5051919050565b600060208284031215612e3e57600080fd5b8151611f6981612a4b565b60005b83811015612e64578181015183820152602001612e4c565b50506000910152565b60008251612e7f818460208701612e49565b9190910192915050565b600060208284031215612e9b57600080fd5b8151611f6981612b4d565b60008151808452612ebe816020860160208601612e49565b601f01601f19169290920160200192915050565b600060406001600160401b038516835260208181850152845160a083860152612efe60e0860182612ea6565b905081860151603f1980878403016060880152612f1b8383612ea6565b88860151888203830160808a01528051808352908601945060009350908501905b80841015612f6e57845180516001600160a01b0316835286015186830152938501936001939093019290860190612f3c565b5060608901516001600160a01b031660a08901526080890151888203830160c08a01529550612f9d8187612ea6565b9a9950505050505050505050565b634e487b7160e01b600052603160045260246000fdfe6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6fa264697066735822122023f62fed31e3ddd0beb4df99592fbd8cceca1e9f9441d172112dd600c1a2158364736f6c63430008130033

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

0000000000000000000000003206695cae29952f4b0c22a169725a865bc8ce0f0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001d4c000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000300c00000000000000000000000072e28c7f34100afefc399fcc0ae041b8fe5841ae000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000045849994fc9c7b15000000000000000000000000000000000000000000000000000000000000a4b100000000000000000000000000000000000000000000000044ae84d8e9a37444000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000033d343f77863cab800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _endpointAddress (address): 0x3206695CaE29952f4b0c22a169725a865bc8Ce0f
Arg [1] : _chainIdPairs (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [2] : _minTargetAppGasDefault (uint256): 120000

-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 0000000000000000000000003206695cae29952f4b0c22a169725a865bc8ce0f
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 000000000000000000000000000000000000000000000000000000000001d4c0
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [4] : 000000000000000000000000000000000000000000000000000000000000300c
Arg [5] : 00000000000000000000000072e28c7f34100afefc399fcc0ae041b8fe5841ae
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [10] : 00000000000000000000000000000000000000000000000045849994fc9c7b15
Arg [11] : 000000000000000000000000000000000000000000000000000000000000a4b1
Arg [12] : 00000000000000000000000000000000000000000000000044ae84d8e9a37444
Arg [13] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [14] : 00000000000000000000000000000000000000000000000033d343f77863cab8
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000000


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
[ 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.