creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "CCIP_NEW.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {IRouterClient} from \"@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol\";\nimport {Client} from \"@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol\";\nimport {CCIPReceiver} from \"@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol\";\nimport {IERC20} from \"@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {EnumerableMap} from \"@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/utils/structs/EnumerableMap.sol\";\n\ninterface IV3SwapRouter {\n    struct ExactInputSingleParams {\n        address tokenIn;\n        address tokenOut;\n        uint24 fee;\n        address recipient;\n        uint256 amountIn;\n        uint256 amountOutMinimum;\n        uint160 sqrtPriceLimitX96;\n    }\n    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);\n\n    struct ExactInputParams {\n        bytes path;\n        address recipient;\n        uint256 amountIn;\n        uint256 amountOutMinimum;\n    }\n    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);\n\n    struct ExactOutputSingleParams {\n        address tokenIn;\n        address tokenOut;\n        uint24 fee;\n        address recipient;\n        uint256 amountOut;\n        uint256 amountInMaximum;\n        uint160 sqrtPriceLimitX96;\n    }\n    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);\n\n    struct ExactOutputParams {\n        bytes path;\n        address recipient;\n        uint256 amountOut;\n        uint256 amountInMaximum;\n    }\n    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);\n\n    function uniswapV3SwapCallback(\n        int256 amount0Delta,\n        int256 amount1Delta,\n        bytes calldata data\n    ) external;\n\n    function swapExactTokensForTokens(\n        uint256 amountIn,\n        uint256 amountOutMin,\n        address[] calldata path,\n        address to\n    ) external payable returns (uint256 amountOut);\n    function swapTokensForExactTokens(\n        uint256 amountOut,\n        uint256 amountInMax,\n        address[] calldata path,\n        address to\n    ) external payable returns (uint256 amountIn);\n\n    function WETH9() external view returns (address);\n}\n\ninterface IUniswapV2Router02 {\n    function WETH() external pure returns (address);\n\n    function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n        uint amountIn,\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external;\n    function swapExactETHForTokensSupportingFeeOnTransferTokens(\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external payable;\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\n        uint amountIn,\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external;\n\n    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n}\n\ninterface IWETH is IERC20 {\n    function deposit() external payable;\n    function withdraw(uint amount) external;\n}\n\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n\nabstract contract Ownable is Context {\n    address private _owner;\n    error OwnableUnauthorizedAccount(address account);\n    error OwnableInvalidOwner(address owner);\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n\nlibrary BytesLib {\n    function slice(\n        bytes memory _bytes,\n        uint256 _start,\n        uint256 _length\n    ) internal pure returns (bytes memory) {\n        require(_length + 31 >= _length, 'slice_overflow');\n        require(_start + _length >= _start, 'slice_overflow');\n        require(_bytes.length >= _start + _length, 'slice_outOfBounds');\n\n        bytes memory tempBytes;\n\n        assembly {\n            switch iszero(_length)\n                case 0 {\n                    // Get a location of some free memory and store it in tempBytes as\n                    // Solidity does for memory variables.\n                    tempBytes := mload(0x40)\n\n                    // The first word of the slice result is potentially a partial\n                    // word read from the original array. To read it, we calculate\n                    // the length of that partial word and start copying that many\n                    // bytes into the array. The first word we copy will start with\n                    // data we don't care about, but the last `lengthmod` bytes will\n                    // land at the beginning of the contents of the new array. When\n                    // we're done copying, we overwrite the full first word with\n                    // the actual length of the slice.\n                    let lengthmod := and(_length, 31)\n\n                    // The multiplication in the next line is necessary\n                    // because when slicing multiples of 32 bytes (lengthmod == 0)\n                    // the following copy loop was copying the origin's length\n                    // and then ending prematurely not copying everything it should.\n                    let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n                    let end := add(mc, _length)\n\n                    for {\n                        // The multiplication in the next line has the same exact purpose\n                        // as the one above.\n                        let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n                    } lt(mc, end) {\n                        mc := add(mc, 0x20)\n                        cc := add(cc, 0x20)\n                    } {\n                        mstore(mc, mload(cc))\n                    }\n\n                    mstore(tempBytes, _length)\n\n                    //update free-memory pointer\n                    //allocating the array padded to 32 bytes like the compiler does now\n                    mstore(0x40, and(add(mc, 31), not(31)))\n                }\n                //if we want a zero-length slice let's just return a zero-length array\n                default {\n                    tempBytes := mload(0x40)\n                    //zero out the 32 bytes slice we are about to return\n                    //we need to do it because Solidity does not garbage collect\n                    mstore(tempBytes, 0)\n\n                    mstore(0x40, add(tempBytes, 0x20))\n                }\n        }\n\n        return tempBytes;\n    }\n\n    function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\n        require(_start + 20 >= _start, 'toAddress_overflow');\n        require(_bytes.length >= _start + 20, 'toAddress_outOfBounds');\n        address tempAddress;\n\n        assembly {\n            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\n        }\n\n        return tempAddress;\n    }\n\n    function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) {\n        require(_start + 3 >= _start, 'toUint24_overflow');\n        require(_bytes.length >= _start + 3, 'toUint24_outOfBounds');\n        uint24 tempUint;\n\n        assembly {\n            tempUint := mload(add(add(_bytes, 0x3), _start))\n        }\n\n        return tempUint;\n    }\n}\n\n/// @title - A simple messenger contract for transferring/receiving tokens and data across chains.\n/// @dev - This example shows how to recover tokens in case of revert\ncontract CCIP is CCIPReceiver, Ownable {\n    using EnumerableMap for EnumerableMap.Bytes32ToUintMap;\n    using SafeERC20 for IERC20;\n    using BytesLib for bytes;\n\n    // Custom errors to provide more descriptive revert messages.\n    error NotEnoughBalance(uint256 currentBalance, uint256 calculatedFees); // Used to make sure contract has enough balance to cover the fees.\n    error NothingToWithdraw(); // Used when trying to withdraw Ether but there's nothing to withdraw.\n    error FailedToWithdrawEth(address owner, address target, uint256 value); // Used when the withdrawal of Ether fails.\n    error DestinationChainNotAllowlisted(uint64 destinationChainSelector); // Used when the destination chain has not been allowlisted by the contract owner.\n    error SourceChainNotAllowed(uint64 sourceChainSelector); // Used when the source chain has not been allowlisted by the contract owner.\n    error SenderNotAllowed(address sender); // Used when the sender has not been allowlisted by the contract owner.\n    error InvalidReceiverAddress(); // Used when the receiver address is 0.\n    error OnlySelf(); // Used when a function is called outside of the contract itself.\n    error ErrorCase(); // Used when simulating a revert during message processing.\n    error MessageNotFailed(bytes32 messageId);\n\n    // Example error code, could have many different error codes.\n    enum ErrorCode {\n        // RESOLVED is first so that the default value is resolved.\n        RESOLVED,\n        // Could have any number of error codes here.\n        FAILED\n    }\n\n    struct FailedMessage {\n        bytes32 messageId;\n        ErrorCode errorCode;\n    }\n\n    struct FailedMessagesUsers {\n        address token;\n        address receiver;\n        uint256 amount;\n        bool isRedeemed;\n        bytes32 messageId;\n    }\n\n    struct AddressNumber {\n        address user;\n        uint256 index;\n    }\n\n    // Event emitted when a message is sent to another chain.\n    event MessageSent(\n        bytes32 indexed messageId, // The unique ID of the CCIP message.\n        uint64 indexed destinationChainSelector, // The chain selector of the destination chain.\n        address receiver, // The address of the receiver on the destination chain.\n        string text, // The text being sent.\n        address token, // The token address that was transferred.\n        uint256 tokenAmount, // The token amount that was transferred.\n        address feeToken, // the token address used to pay CCIP fees.\n        uint256 fees // The fees paid for sending the message.\n    );\n\n    // Event emitted when a message is received from another chain.\n    event MessageReceived(\n        bytes32 indexed messageId, // The unique ID of the CCIP message.\n        uint64 indexed sourceChainSelector, // The chain selector of the source chain.\n        address sender, // The address of the sender from the source chain.\n        string text, // The text that was received.\n        address token, // The token address that was transferred.\n        uint256 tokenAmount // The token amount that was transferred.\n    );\n\n    event MessageFailed(bytes32 indexed messageId, bytes reason);\n    event MessageRecovered(bytes32 indexed messageId);\n    event TimeLockActivated(uint256 indexed time);\n\n    bytes32 private s_lastReceivedMessageId; // Store the last received messageId.\n    address private s_lastReceivedTokenAddress; // Store the last received token address.\n    uint256 private s_lastReceivedTokenAmount; // Store the last received amount.\n    string private s_lastReceivedText; // Store the last received text.\n\n    // Mapping to keep track of allowlisted destination chains.\n    mapping(uint64 => bool) public allowlistedDestinationChains;\n\n    // Mapping to keep track of allowlisted source chains.\n    mapping(uint64 => bool) public allowlistedSourceChains;\n\n    // Mapping to keep track of allowlisted senders.\n    mapping(address => bool) public allowlistedSenders;\n\n    IERC20 private immutable s_linkToken;\n    address public immutable weth;\n    address public immutable usdc;\n\n    // The message contents of failed messages are stored here.\n    mapping(bytes32 messageId => Client.Any2EVMMessage contents) public s_messageContents;\n\n    // User => FailedMessagesUsers[]\n    mapping (address => FailedMessagesUsers[]) public failedMessagesUsers;\n    // MessageId => (address, number)\n    mapping (bytes32 => AddressNumber) public failedMessageByMessageId;\n\n    // Contains failed messages and their state.\n    EnumerableMap.Bytes32ToUintMap internal s_failedMessages;\n    IV3SwapRouter public v3Router;\n    IUniswapV2Router02 public v2Router;\n    uint256 public swapFee; // Fee must be by 1000, so if you want 5% this will be 5000\n    address public feeReceiver;\n    uint256 public constant maxFee = 20000; // Max fee is 20%\n    uint256 public constant feeBps = 1000; // 1000 is 1% so we can have many decimals\n    uint256 public timeLockTime;\n\n    /// @notice Constructor initializes the contract with the router address.\n    /// @param _router The address of the router contract.\n    /// @param _link The address of the link contract.\n    constructor(\n        address _router,\n        address _link,\n        address _usdc,\n        address _v3Router, \n        address _v2Router,\n        uint256 _swapFee,\n        address _feeReceiver\n    ) CCIPReceiver(_router) Ownable(msg.sender) {\n        s_linkToken = IERC20(_link);\n        v3Router = IV3SwapRouter(_v3Router);\n        v2Router = IUniswapV2Router02(_v2Router);\n        usdc = _usdc;\n        weth = v3Router.WETH9();\n        swapFee = _swapFee;\n        feeReceiver = _feeReceiver;\n    }\n\n    /// @dev Modifier that checks if the chain with the given destinationChainSelector is allowlisted.\n    /// @param _destinationChainSelector The selector of the destination chain.\n    modifier onlyAllowlistedDestinationChain(uint64 _destinationChainSelector) {\n        if (!allowlistedDestinationChains[_destinationChainSelector])\n            revert DestinationChainNotAllowlisted(_destinationChainSelector);\n        _;\n    }\n\n    /// @dev Modifier that checks if the chain with the given sourceChainSelector is allowlisted and if the sender is allowlisted.\n    /// @param _sourceChainSelector The selector of the destination chain.\n    /// @param _sender The address of the sender.\n    modifier onlyAllowlisted(uint64 _sourceChainSelector, address _sender) {\n        if (!allowlistedSourceChains[_sourceChainSelector])\n            revert SourceChainNotAllowed(_sourceChainSelector);\n        if (!allowlistedSenders[_sender]) revert SenderNotAllowed(_sender);\n        _;\n    }\n\n    /// @dev Modifier that checks the receiver address is not 0.\n    /// @param _receiver The receiver address.\n    modifier validateReceiver(address _receiver) {\n        if (_receiver == address(0)) revert InvalidReceiverAddress();\n        _;\n    }\n\n    /// @dev Modifier to allow only the contract itself to execute a function.\n    /// Throws an exception if called by any account other than the contract itself.\n    modifier onlySelf() {\n        if (msg.sender != address(this)) revert OnlySelf();\n        _;\n    }\n\n    function activateTimelock() external onlyOwner {\n        timeLockTime = block.timestamp + 48 hours;\n        emit TimeLockActivated(timeLockTime);\n    }\n    \n    function transferOwnership(address newOwner) public override onlyOwner {\n        require(timeLockTime > 0 && block.timestamp > timeLockTime, \"Timelocked\");\n        timeLockTime = 0; // Reset it\n\n        transferOwnership(newOwner);\n    }\n\n    function changeFeeAndAddress(uint256 _fee, address _feeReceiver) external onlyOwner {\n        require(timeLockTime > 0 && block.timestamp > timeLockTime, \"Timelocked\");\n        timeLockTime = 0; // Reset it\n\n        require(_fee < maxFee, \"Max fee exceeded\");\n        swapFee = _fee;\n        feeReceiver = _feeReceiver;\n    }\n\n    function changeRouters(address _v2Router, address _v3Router) external onlyOwner {\n        require(timeLockTime > 0 && block.timestamp > timeLockTime, \"Timelocked\");\n        timeLockTime = 0; // Reset it\n\n        v3Router = IV3SwapRouter(_v3Router);\n        v2Router = IUniswapV2Router02(_v2Router);\n    }\n\n    /// @dev Updates the allowlist status of a destination chain for transactions.\n    /// @notice This function can only be called by the owner.\n    /// @param _destinationChainSelector The selector of the destination chain to be updated.\n    /// @param allowed The allowlist status to be set for the destination chain.\n    function allowlistDestinationChain(\n        uint64 _destinationChainSelector,\n        bool allowed\n    ) external onlyOwner {\n        allowlistedDestinationChains[_destinationChainSelector] = allowed;\n    }\n\n    /// @dev Updates the allowlist status of a source chain\n    /// @notice This function can only be called by the owner.\n    /// @param _sourceChainSelector The selector of the source chain to be updated.\n    /// @param allowed The allowlist status to be set for the source chain.\n    function allowlistSourceChain(\n        uint64 _sourceChainSelector,\n        bool allowed\n    ) external onlyOwner {\n        allowlistedSourceChains[_sourceChainSelector] = allowed;\n    }\n\n    /// @dev Updates the allowlist status of a sender for transactions.\n    /// @notice This function can only be called by the owner.\n    /// @param _sender The address of the sender to be updated.\n    /// @param allowed The allowlist status to be set for the sender.\n    function allowlistSender(address _sender, bool allowed) external onlyOwner {\n        allowlistedSenders[_sender] = allowed;\n    }\n\n    /// @notice Sends data and transfer tokens to receiver on the destination chain.\n    /// @notice Pay for fees in LINK.\n    /// @dev Assumes your contract has sufficient LINK to pay for CCIP fees.\n    /// @param _destinationChainSelector The identifier (aka selector) for the destination blockchain.\n    /// @param _receiver The address of the recipient on the destination blockchain.\n    /// @param _text The string data to be sent.\n    /// @param _token token address.\n    /// @param _amount token amount.\n    /// @return messageId The ID of the CCIP message that was sent.\n    function sendMessagePayLINK(\n        uint64 _destinationChainSelector,\n        address _receiver,\n        string memory _text,\n        address _token,\n        uint256 _amount,\n        uint256 _gasLimitReceiver\n    )\n        internal\n        onlyAllowlistedDestinationChain(_destinationChainSelector)\n        validateReceiver(_receiver)\n        returns (bytes32 messageId)\n    {\n        // Create an EVM2AnyMessage struct in memory with necessary information for sending a cross-chain message\n        // address(linkToken) means fees are paid in LINK\n        Client.EVM2AnyMessage memory evm2AnyMessage = _buildCCIPMessage(\n            _receiver,\n            _text,\n            _token,\n            _amount,\n            address(s_linkToken),\n            _gasLimitReceiver\n        );\n\n        // Initialize a router client instance to interact with cross-chain router\n        IRouterClient router = IRouterClient(this.getRouter());\n\n        // Get the fee required to send the CCIP message\n        uint256 fees = router.getFee(_destinationChainSelector, evm2AnyMessage);\n\n        if (fees > s_linkToken.balanceOf(address(this)))\n            revert NotEnoughBalance(s_linkToken.balanceOf(address(this)), fees);\n\n        // approve the Router to transfer LINK tokens on contract's behalf. It will spend the fees in LINK\n        s_linkToken.approve(address(router), fees);\n\n        // approve the Router to spend tokens on contract's behalf. It will spend the amount of the given token\n        checkAndApproveAll(_token, address(router), _amount);\n\n        // Send the message through the router and store the returned message ID\n        messageId = router.ccipSend(_destinationChainSelector, evm2AnyMessage);\n\n        // Emit an event with message details\n        emit MessageSent(\n            messageId,\n            _destinationChainSelector,\n            _receiver,\n            _text,\n            _token,\n            _amount,\n            address(s_linkToken),\n            fees\n        );\n\n        // Return the message ID\n        return messageId;\n    }\n\n    /// @notice Sends data and transfer tokens to receiver on the destination chain.\n    /// @notice Pay for fees in native gas.\n    /// @dev Assumes your contract has sufficient native gas like ETH on Ethereum or MATIC on Polygon.\n    /// @param _destinationChainSelector The identifier (aka selector) for the destination blockchain.\n    /// @param _receiver The address of the recipient on the destination blockchain.\n    /// @param _text The string data to be sent.\n    /// @param _token token address.\n    /// @param _amount token amount.\n    /// @return messageId The ID of the CCIP message that was sent.\n    function sendMessagePayNative(\n        uint64 _destinationChainSelector,\n        address _receiver,\n        string memory _text,\n        address _token,\n        uint256 _amount,\n        uint256 _gasLimitReceiver\n    )\n        internal\n        onlyAllowlistedDestinationChain(_destinationChainSelector)\n        validateReceiver(_receiver)\n        returns (bytes32 messageId)\n    {\n        // Create an EVM2AnyMessage struct in memory with necessary information for sending a cross-chain message\n        // address(0) means fees are paid in native gas\n        Client.EVM2AnyMessage memory evm2AnyMessage = _buildCCIPMessage(\n            _receiver,\n            _text,\n            _token,\n            _amount,\n            address(0),\n            _gasLimitReceiver\n        );\n\n        // Initialize a router client instance to interact with cross-chain router\n        IRouterClient router = IRouterClient(this.getRouter());\n\n        // Get the fee required to send the CCIP message\n        uint256 fees = router.getFee(_destinationChainSelector, evm2AnyMessage);\n\n        if (fees > address(this).balance)\n            revert NotEnoughBalance(address(this).balance, fees);\n\n        // approve the Router to spend tokens on contract's behalf. It will spend the amount of the given token\n        checkAndApproveAll(_token, address(router), _amount);\n        \n        // Send the message through the router and store the returned message ID\n        messageId = router.ccipSend{value: fees}(\n            _destinationChainSelector,\n            evm2AnyMessage\n        );\n\n        payable(msg.sender).transfer(address(this).balance); // Refund the remaining msg.value\n\n        // Emit an event with message details\n        emit MessageSent(\n            messageId,\n            _destinationChainSelector,\n            _receiver,\n            _text,\n            _token,\n            _amount,\n            address(0),\n            fees\n        );\n\n        // Return the message ID\n        return messageId;\n    }\n\n\n    /*** My functions ***/\n    struct ReceiverSwapData {\n        address finalToken;\n        address userReceiver;\n        uint256 minAmountOut;\n        uint256 minAmountOutV2Swap;\n        bool isV2;\n        bytes path;\n        address[] v2Path;\n    }\n    struct InitialSwapData {\n        address tokenIn;   // Token you're sending for a crosschain swap\n        uint256 amountIn;  // For the token you send\n        uint256 minAmountOutV2Swap;  // For the token you send\n        uint256 minAmountOutV3Swap;\n        bool swapTokenInV2First; // Can be true = swap to v2 or false = swap to v3 towards WETH then we do WETH to USDC in v3, this will be false if the path is weth\n        bool unwrappedETH; // Users may want to use WETH directly instead of ETH\n        bytes v3InitialSwap; // This is the path for token to USDC can be just WETH to USDC or TOKEN to WETH to USDC\n    }\n    // All it does is encode the parameters and convert that bytes into string for the transfer and executes the right function\n    /// swapTokenInV2First Is used to determine how we get USDC. USDC is always at V3, meaning we gotta go from token -v2 or v3-> ETH -v3-> USDC\n    /*\n        a. If the token is USDC we don't swap it at all and just send it\n        b. If the token is a v2 token, swap it for weth first, then swap the weth for USDC (using _v3InitialSwap)\n        c. If the token is a v3 token, swap it for weth and for USDC in the same router (using _v3InitialSwap)\n    */\n\n    function getLastAddressPath(bytes memory _path) public pure returns(address) {\n        return _path.toAddress(_path.length - 20);\n    }\n\n    // Approves from this to the target contract unlimited tokens\n    function checkAndApproveAll(address _token, address _target, uint256 _amountToCheck) internal {\n        if (IERC20(_token).allowance(address(this), _target) < _amountToCheck) {\n            IERC20(_token).safeApprove(_target, 0);\n            IERC20(_token).safeApprove(_target, ~uint256(0));\n        }\n    }\n\n    function swapInitialData(\n        InitialSwapData memory _initialSwapData\n    ) internal returns(uint256 USDCOut) {\n        if (_initialSwapData.tokenIn == usdc) {\n            // Step a)\n            USDCOut = _initialSwapData.amountIn;\n        } else {\n            // Step b)\n            if (_initialSwapData.swapTokenInV2First) {\n                require(_initialSwapData.tokenIn != weth, \"Token in must not be WETH\");\n                checkAndApproveAll(_initialSwapData.tokenIn, address(v2Router), _initialSwapData.amountIn);\n\n                // Swap ReceiverSwapData.finalToken to ETH via V2, then to USDC via uniswap V3\n                address[] memory path = new address[](2);\n                path[0] = _initialSwapData.tokenIn;\n                path[1] = weth;\n                uint256 wethBalanceBefore = IERC20(weth).balanceOf(address(this));\n                v2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(\n                    _initialSwapData.amountIn,\n                    _initialSwapData.minAmountOutV2Swap,\n                    path,\n                    address(this),\n                    block.timestamp\n                );\n                uint256 wethBalanceAfter = IERC20(weth).balanceOf(address(this));\n                uint256 wethOut = wethBalanceAfter - wethBalanceBefore;\n                _initialSwapData.amountIn = wethOut; // This is updated for the next step\n                checkAndApproveAll(weth, address(v3Router), wethOut);\n            } else {\n                checkAndApproveAll(_initialSwapData.tokenIn, address(v3Router), _initialSwapData.amountIn);\n            }\n            // Step c)\n            uint256 beforeSendingUsdc = IERC20(usdc).balanceOf(address(this));\n            IV3SwapRouter.ExactInputParams memory params = IV3SwapRouter.ExactInputParams(\n                _initialSwapData.v3InitialSwap, address(this), _initialSwapData.amountIn, _initialSwapData.minAmountOutV3Swap\n            );\n\n            // Swap ReceiverSwapData.finalToken to ETH via V3, then to USDC via uniswap V3\n            USDCOut = v3Router.exactInput( params );\n\n            uint256 afterSendingUsdc = IERC20(usdc).balanceOf(address(this));\n            require(afterSendingUsdc > beforeSendingUsdc, \"Must swap into USDC\");\n        }\n        // Send the fee\n        uint256 feeAmount = USDCOut * swapFee / (feeBps * 100);\n        IERC20(usdc).safeTransfer(feeReceiver, feeAmount);\n        USDCOut = USDCOut - feeAmount;\n    }\n\n    // The token that will be crossed is always USDC\n    function sendMessagePayFirstStep(\n        uint64 _destinationChainSelector,\n        address _receiverCCIPInOtherChain,\n        uint256 _gasLimitReceiver, // How much gas the receiver will have to work with\n        bool _isLinkOrNative,   // True = LINK, false = Native\n        InitialSwapData memory _initialSwapData,\n        ReceiverSwapData memory _receiverSwapData\n    )\n        external\n        payable\n        onlyAllowlistedDestinationChain(_destinationChainSelector)\n        validateReceiver(_receiverCCIPInOtherChain)\n        returns (bytes32 messageId)\n    {\n        require(allowlistedSenders[_receiverCCIPInOtherChain], \"Must be a valid destination address\");\n        if (!_initialSwapData.unwrappedETH && _initialSwapData.tokenIn == weth) {\n            IWETH(weth).deposit{value: msg.value - _initialSwapData.amountIn}(); // _initialSwapData.amountIn will be the CCIP fee when using eth\n            _initialSwapData.amountIn = msg.value - _initialSwapData.amountIn;\n        } else {\n            // To take into consideration transfer fees\n            uint256 beforeSending = IERC20(_initialSwapData.tokenIn).balanceOf(address(this));\n            IERC20(_initialSwapData.tokenIn).safeTransferFrom(msg.sender, address(this), _initialSwapData.amountIn);\n            uint256 afterSending = IERC20(_initialSwapData.tokenIn).balanceOf(address(this));\n            _initialSwapData.amountIn = afterSending - beforeSending;\n        }\n        address outputToken = getLastAddressPath(_initialSwapData.v3InitialSwap);\n        require(outputToken == usdc, 'Must swap to USDC');\n        uint256 USDCOut = swapInitialData(_initialSwapData);\n\n        if (_isLinkOrNative) {\n            return sendMessagePayLINK(\n                _destinationChainSelector,\n                _receiverCCIPInOtherChain,\n                string(abi.encode(\n                    _receiverSwapData\n                )),\n                usdc,\n                USDCOut,\n                _gasLimitReceiver\n            );\n        } else {\n            return sendMessagePayNative(\n                _destinationChainSelector,\n                _receiverCCIPInOtherChain,\n                string(abi.encode(\n                    _receiverSwapData\n                )),\n                usdc,\n                USDCOut,\n                _gasLimitReceiver\n            );\n        }\n    }\n\n    function calculateFeeGas(\n        uint64 _destinationChainSelector,\n        address _receiver,\n        address _token,\n        uint256 _amount,\n        uint256 _gasLimitReceiver,\n        bool _payInLINK,\n        ReceiverSwapData memory _receiverSwapData\n    ) external view returns (uint256 fees) {\n        // Create an EVM2AnyMessage struct in memory with necessary information for sending a cross-chain message\n        // address(0) means fees are paid in native gas\n        Client.EVM2AnyMessage memory evm2AnyMessage = _buildCCIPMessage(\n            _receiver,\n            string(abi.encode(_receiverSwapData)),\n            _token,\n            _amount,\n            _payInLINK ? address(s_linkToken) : address(0),\n            _gasLimitReceiver\n        );\n        // Initialize a router client instance to interact with cross-chain router\n        IRouterClient router = IRouterClient(this.getRouter());\n        // Get the fee required to send the CCIP message\n        fees = router.getFee(_destinationChainSelector, evm2AnyMessage);\n    }\n    /*** My functions ***/\n\n\n    /**\n     * @notice Returns the details of the last CCIP received message.\n     * @dev This function retrieves the ID, text, token address, and token amount of the last received CCIP message.\n     * @return messageId The ID of the last received CCIP message.\n     * @return text The text of the last received CCIP message.\n     * @return tokenAddress The address of the token in the last CCIP received message.\n     * @return tokenAmount The amount of the token in the last CCIP received message.\n     */\n    function getLastReceivedMessageDetails()\n        public\n        view\n        returns (\n            bytes32 messageId,\n            string memory text,\n            address tokenAddress,\n            uint256 tokenAmount\n        )\n    {\n        return (\n            s_lastReceivedMessageId,\n            s_lastReceivedText,\n            s_lastReceivedTokenAddress,\n            s_lastReceivedTokenAmount\n        );\n    }\n\n    /**\n     * @notice Retrieves a paginated list of failed messages.\n     * @dev This function returns a subset of failed messages defined by `offset` and `limit` parameters. It ensures that the pagination parameters are within the bounds of the available data set.\n     * @param offset The index of the first failed message to return, enabling pagination by skipping a specified number of messages from the start of the dataset.\n     * @param limit The maximum number of failed messages to return, restricting the size of the returned array.\n     * @return failedMessages An array of `FailedMessage` struct, each containing a `messageId` and an `errorCode` (RESOLVED or FAILED), representing the requested subset of failed messages. The length of the returned array is determined by the `limit` and the total number of failed messages.\n     */\n    function getFailedMessages(\n        uint256 offset,\n        uint256 limit\n    ) external view returns (FailedMessage[] memory) {\n        uint256 length = s_failedMessages.length();\n\n        // Calculate the actual number of items to return (can't exceed total length or requested limit)\n        uint256 returnLength = (offset + limit > length)\n            ? length - offset\n            : limit;\n        FailedMessage[] memory failedMessages = new FailedMessage[](\n            returnLength\n        );\n\n        // Adjust loop to respect pagination (start at offset, end at offset + limit or total length)\n        for (uint256 i = 0; i < returnLength; i++) {\n            (bytes32 messageId, uint256 errorCode) = s_failedMessages.at(\n                offset + i\n            );\n            failedMessages[i] = FailedMessage(messageId, ErrorCode(errorCode));\n        }\n        return failedMessages;\n    }\n\n    /// @notice The entrypoint for the CCIP router to call. This function should\n    /// never revert, all errors should be handled internally in this contract.\n    /// @param any2EvmMessage The message to process.\n    /// @dev Extremely important to ensure only router calls this.\n    function ccipReceive(\n        Client.Any2EVMMessage calldata any2EvmMessage\n    )\n        external\n        override\n        onlyRouter\n        onlyAllowlisted(\n            any2EvmMessage.sourceChainSelector,\n            abi.decode(any2EvmMessage.sender, (address))\n        ) // Make sure the source chain and sender are allowlisted\n    {\n        /* solhint-disable no-empty-blocks */\n        try this.processMessage(any2EvmMessage) {\n            // Intentionally empty in this example; no action needed if processMessage succeeds\n        } catch (bytes memory err) {\n            // Could set different error codes based on the caught error. Each could be\n            // handled differently.\n            s_failedMessages.set(\n                any2EvmMessage.messageId,\n                uint256(ErrorCode.FAILED)\n            );\n            s_messageContents[any2EvmMessage.messageId] = any2EvmMessage;\n\n            /*- My code -*/\n            string memory text = abi.decode(any2EvmMessage.data, (string)); // abi-decoding of the sent text\n            ReceiverSwapData memory receiverData = abi.decode(bytes(text), (ReceiverSwapData));\n            failedMessagesUsers[receiverData.userReceiver].push(FailedMessagesUsers(\n                usdc,\n                receiverData.userReceiver,\n                any2EvmMessage.destTokenAmounts[0].amount,\n                false,\n                any2EvmMessage.messageId\n            ));\n            failedMessageByMessageId[any2EvmMessage.messageId] = AddressNumber(\n                receiverData.userReceiver, failedMessagesUsers[receiverData.userReceiver].length);\n            /*- My code -*/\n            \n            // Don't revert so CCIP doesn't revert. Emit event instead.\n            // The message can be retried later without having to do manual execution of CCIP.\n            emit MessageFailed(any2EvmMessage.messageId, err);\n            return;\n        }\n    }\n\n    /// @notice Serves as the entry point for this contract to process incoming messages.\n    /// @param any2EvmMessage Received CCIP message.\n    /// @dev Transfers specified token amounts to the owner of this contract. This function\n    /// must be external because of the  try/catch for error handling.\n    /// It uses the `onlySelf`: can only be called from the contract.\n    function processMessage(\n        Client.Any2EVMMessage calldata any2EvmMessage\n    )\n        external\n        onlySelf\n    {\n        _ccipReceive(any2EvmMessage); // process the message - may revert as well\n    }\n\n    /// @notice Allows the owner to retry a failed message in order to unblock the associated tokens.\n    /// @param messageId The unique identifier of the failed message.\n    /// @param tokenReceiver The address to which the tokens will be sent.\n    /// @dev This function is only callable by the contract owner. It changes the status of the message\n    /// from 'failed' to 'resolved' to prevent reentry and multiple retries of the same message.\n    function retryFailedMessage(\n        bytes32 messageId,\n        address tokenReceiver,\n        uint256 index\n    ) external onlyOwner {\n        // Check if the message has failed; if not, revert the transaction.\n        if (s_failedMessages.get(messageId) != uint256(ErrorCode.FAILED))\n            revert MessageNotFailed(messageId);\n\n        // Set the error code to RESOLVED to disallow reentry and multiple retries of the same failed message.\n        s_failedMessages.set(messageId, uint256(ErrorCode.RESOLVED));\n\n        /*- My code -*/\n        require(failedMessagesUsers[tokenReceiver][index].isRedeemed == false,\n            \"Already redeemed\");\n        failedMessagesUsers[tokenReceiver][index].isRedeemed = true;\n        /*- My code -*/\n\n        // Retrieve the content of the failed message.\n        Client.Any2EVMMessage storage message = s_messageContents[messageId];\n\n        // This example expects one token to have been sent, but you can handle multiple tokens.\n        // Transfer the associated tokens to the specified receiver as an escape hatch.\n        IERC20(message.destTokenAmounts[0].token).safeTransfer(\n            tokenReceiver,\n            message.destTokenAmounts[0].amount\n        );\n\n        // Emit an event indicating that the message has been recovered.\n        emit MessageRecovered(messageId);\n    }\n\n    /*\n        1. First we swap the USDC for ETH in v3\n        2. Then we check if the token we want is in v3 or v2, and swap that ETH for the token in the right uni swap\n    */\n    function _ccipReceive(\n        Client.Any2EVMMessage memory any2EvmMessage\n    ) internal override {\n        s_lastReceivedMessageId = any2EvmMessage.messageId; // fetch the messageId\n        s_lastReceivedText = abi.decode(any2EvmMessage.data, (string)); // abi-decoding of the sent text\n        // Expect one token to be transferred at once, but you can transfer several tokens.\n        s_lastReceivedTokenAddress = any2EvmMessage.destTokenAmounts[0].token;\n        s_lastReceivedTokenAmount = any2EvmMessage.destTokenAmounts[0].amount;\n        emit MessageReceived(\n            any2EvmMessage.messageId,\n            any2EvmMessage.sourceChainSelector, // fetch the source chain identifier (aka selector)\n            abi.decode(any2EvmMessage.sender, (address)), // abi-decoding of the sender address,\n            abi.decode(any2EvmMessage.data, (string)),\n            any2EvmMessage.destTokenAmounts[0].token,\n            any2EvmMessage.destTokenAmounts[0].amount\n        );\n\n        ReceiverSwapData memory receiverData = abi.decode(bytes(s_lastReceivedText), (ReceiverSwapData));\n        if (receiverData.finalToken == usdc) {\n            return IERC20(usdc).safeTransfer(receiverData.userReceiver, s_lastReceivedTokenAmount);\n        }\n\n        // 1. Swap USDC to ETH (and/or final token) on v3\n        IERC20(usdc).approve(address(v3Router), s_lastReceivedTokenAmount);\n        IV3SwapRouter.ExactInputParams memory params = IV3SwapRouter.ExactInputParams(\n            receiverData.path, receiverData.userReceiver, s_lastReceivedTokenAmount, receiverData.minAmountOut\n        );\n        uint256 wethOrFinalTokenOut = v3Router.exactInput(params);\n        // 2. Swap ETH to token in V2\n        if (receiverData.isV2) { // If it's v2, the previous swap have given us weth for this next swap\n            IERC20(weth).approve(address(v2Router), wethOrFinalTokenOut);\n            v2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(\n                wethOrFinalTokenOut,\n                receiverData.minAmountOutV2Swap,\n                receiverData.v2Path,\n                receiverData.userReceiver,\n                block.timestamp\n            );\n        }\n    }\n\n\n    /// @notice Construct a CCIP message.\n    /// @dev This function will create an EVM2AnyMessage struct with all the necessary information for programmable tokens transfer.\n    /// @param _receiver The address of the receiver.\n    /// @param _text The string data to be sent.\n    /// @param _token The token to be transferred.\n    /// @param _amount The amount of the token to be transferred.\n    /// @param _feeTokenAddress The address of the token used for fees. Set address(0) for native gas.\n    /// @return Client.EVM2AnyMessage Returns an EVM2AnyMessage struct which contains information for sending a CCIP message.\n    function _buildCCIPMessage(\n        address _receiver,\n        string memory _text,\n        address _token,\n        uint256 _amount,\n        address _feeTokenAddress,\n        uint256 _gasLimitReceiver\n    ) internal pure returns (Client.EVM2AnyMessage memory) {\n        // Set the token amounts\n        Client.EVMTokenAmount[]\n            memory tokenAmounts = new Client.EVMTokenAmount[](1);\n        Client.EVMTokenAmount memory tokenAmount = Client.EVMTokenAmount({\n            token: _token,\n            amount: _amount\n        });\n        tokenAmounts[0] = tokenAmount;\n        // Create an EVM2AnyMessage struct in memory with necessary information for sending a cross-chain message\n        Client.EVM2AnyMessage memory evm2AnyMessage = Client.EVM2AnyMessage({\n            receiver: abi.encode(_receiver), // ABI-encoded receiver address\n            data: abi.encode(_text), // ABI-encoded string\n            tokenAmounts: tokenAmounts, // The amount and type of token being transferred\n            extraArgs: Client._argsToBytes(\n                // Additional arguments, setting gas limit\n                Client.EVMExtraArgsV1({gasLimit: _gasLimitReceiver})\n            ),\n            // Set the feeToken to a feeTokenAddress, indicating specific asset will be used for fees\n            feeToken: _feeTokenAddress\n        });\n        return evm2AnyMessage;\n    }\n\n    /// @notice Fallback function to allow the contract to receive Ether.\n    /// @dev This function has no function body, making it a default function for receiving Ether.\n    /// It is automatically called when Ether is sent to the contract without any data.\n    receive() external payable {}\n\n    /// @notice Allows the contract owner to withdraw the entire balance of Ether from the contract.\n    /// @dev This function reverts if there are no funds to withdraw or if the transfer fails.\n    /// It should only be callable by the owner of the contract.\n    /// @param _beneficiary The address to which the Ether should be sent.\n    function withdraw(address _beneficiary) public onlyOwner {\n        require(timeLockTime > 0 && block.timestamp > timeLockTime, \"Timelocked\");\n        timeLockTime = 0; // Reset it\n\n        // Retrieve the balance of this contract\n        uint256 amount = address(this).balance;\n\n        // Revert if there is nothing to withdraw\n        if (amount == 0) revert NothingToWithdraw();\n\n        // Attempt to send the funds, capturing the success status and discarding any return data\n        (bool sent, ) = _beneficiary.call{value: amount}(\"\");\n\n        // Revert if the send failed, with information about the attempted transfer\n        if (!sent) revert FailedToWithdrawEth(msg.sender, _beneficiary, amount);\n    }\n\n    /// @notice Allows the owner of the contract to withdraw all tokens of a specific ERC20 token.\n    /// @dev This function reverts with a 'NothingToWithdraw' error if there are no tokens to withdraw.\n    /// @param _beneficiary The address to which the tokens will be sent.\n    /// @param _token The contract address of the ERC20 token to be withdrawn.\n    function withdrawToken(\n        address _beneficiary,\n        address _token\n    ) public onlyOwner {\n        require(timeLockTime > 0 && block.timestamp > timeLockTime, \"Timelocked\");\n        timeLockTime = block.timestamp;\n\n        // Retrieve the balance of this contract\n        uint256 amount = IERC20(_token).balanceOf(address(this));\n\n        // Revert if there is nothing to withdraw\n        if (amount == 0) revert NothingToWithdraw();\n\n        IERC20(_token).safeTransfer(_beneficiary, amount);\n    }\n\n    /*- My functions -*/\n    function recoverFailedTransfer(\n        address tokenReceiver,\n        uint256 index\n    ) external {\n        FailedMessagesUsers storage f = failedMessagesUsers[tokenReceiver][index];\n        require(f.isRedeemed == false, \"Already redeemed\");\n        f.isRedeemed = true;\n        require(msg.sender == f.receiver, \"Must be executed by the receiver\");\n\n        // Check if the message has failed; if not, revert the transaction.\n        if (s_failedMessages.get(f.messageId) != uint256(ErrorCode.FAILED))\n            revert MessageNotFailed(f.messageId);\n\n        // Set the error code to RESOLVED to disallow reentry and multiple retries of the same failed message.\n        s_failedMessages.set(f.messageId, uint256(ErrorCode.RESOLVED));\n\n        // This example expects one token to have been sent, but you can handle multiple tokens.\n        // Transfer the associated tokens to the specified receiver as an escape hatch.\n        IERC20(f.token).safeTransfer(\n            tokenReceiver,\n            f.amount\n        );\n\n        // Emit an event indicating that the message has been recovered.\n        emit MessageRecovered(f.messageId);\n    }\n\n    function getFailedMessagesUser(\n        address _user,\n        uint256 _offset,\n        uint256 _limit\n    ) external view returns (FailedMessagesUsers[] memory) {\n        FailedMessagesUsers[] memory results = new FailedMessagesUsers[](_limit);\n        for (uint256 i = 0; i < _limit; i++) {\n            results[i] = failedMessagesUsers[_user][_offset+i];\n        }\n        return results;\n    }\n\n    function getLengthFailedMessagesUser(address _user) external view returns (uint256) {\n        uint256 size = failedMessagesUsers[_user].length;\n        return size;\n    }\n\n    function getFailedMessageByMessageId(bytes32 _messageId) external view returns (FailedMessagesUsers memory) {\n        AddressNumber storage an = failedMessageByMessageId[_messageId];\n        return failedMessagesUsers[an.user][an.index];\n    }\n    /*- My functions -*/\n}\n"
      },
      "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/utils/structs/EnumerableMap.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableMap.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableMap.js.\n\npragma solidity ^0.8.0;\n\nimport \"./EnumerableSet.sol\";\n\n/**\n * @dev Library for managing an enumerable variant of Solidity's\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\n * type.\n *\n * Maps have the following properties:\n *\n * - Entries are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\n *\n *     // Declare a set state variable\n *     EnumerableMap.UintToAddressMap private myMap;\n * }\n * ```\n *\n * The following map types are supported:\n *\n * - `uint256 -> address` (`UintToAddressMap`) since v3.0.0\n * - `address -> uint256` (`AddressToUintMap`) since v4.6.0\n * - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0\n * - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0\n * - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableMap.\n * ====\n */\nlibrary EnumerableMap {\n  using EnumerableSet for EnumerableSet.Bytes32Set;\n\n  // To implement this library for multiple types with as little code\n  // repetition as possible, we write it in terms of a generic Map type with\n  // bytes32 keys and values.\n  // The Map implementation uses private functions, and user-facing\n  // implementations (such as Uint256ToAddressMap) are just wrappers around\n  // the underlying Map.\n  // This means that we can only create new EnumerableMaps for types that fit\n  // in bytes32.\n\n  struct Bytes32ToBytes32Map {\n    // Storage of keys\n    EnumerableSet.Bytes32Set _keys;\n    mapping(bytes32 => bytes32) _values;\n  }\n\n  /**\n   * @dev Adds a key-value pair to a map, or updates the value for an existing\n   * key. O(1).\n   *\n   * Returns true if the key was added to the map, that is if it was not\n   * already present.\n   */\n  function set(\n    Bytes32ToBytes32Map storage map,\n    bytes32 key,\n    bytes32 value\n  ) internal returns (bool) {\n    map._values[key] = value;\n    return map._keys.add(key);\n  }\n\n  /**\n   * @dev Removes a key-value pair from a map. O(1).\n   *\n   * Returns true if the key was removed from the map, that is if it was present.\n   */\n  function remove(Bytes32ToBytes32Map storage map, bytes32 key) internal returns (bool) {\n    delete map._values[key];\n    return map._keys.remove(key);\n  }\n\n  /**\n   * @dev Returns true if the key is in the map. O(1).\n   */\n  function contains(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool) {\n    return map._keys.contains(key);\n  }\n\n  /**\n   * @dev Returns the number of key-value pairs in the map. O(1).\n   */\n  function length(Bytes32ToBytes32Map storage map) internal view returns (uint256) {\n    return map._keys.length();\n  }\n\n  /**\n   * @dev Returns the key-value pair stored at position `index` in the map. O(1).\n   *\n   * Note that there are no guarantees on the ordering of entries inside the\n   * array, and it may change when more entries are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(Bytes32ToBytes32Map storage map, uint256 index) internal view returns (bytes32, bytes32) {\n    bytes32 key = map._keys.at(index);\n    return (key, map._values[key]);\n  }\n\n  /**\n   * @dev Tries to returns the value associated with `key`. O(1).\n   * Does not revert if `key` is not in the map.\n   */\n  function tryGet(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool, bytes32) {\n    bytes32 value = map._values[key];\n    if (value == bytes32(0)) {\n      return (contains(map, key), bytes32(0));\n    } else {\n      return (true, value);\n    }\n  }\n\n  /**\n   * @dev Returns the value associated with `key`. O(1).\n   *\n   * Requirements:\n   *\n   * - `key` must be in the map.\n   */\n  function get(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bytes32) {\n    bytes32 value = map._values[key];\n    require(value != 0 || contains(map, key), \"EnumerableMap: nonexistent key\");\n    return value;\n  }\n\n  /**\n   * @dev Same as {get}, with a custom error message when `key` is not in the map.\n   *\n   * CAUTION: This function is deprecated because it requires allocating memory for the error\n   * message unnecessarily. For custom revert reasons use {tryGet}.\n   */\n  function get(\n    Bytes32ToBytes32Map storage map,\n    bytes32 key,\n    string memory errorMessage\n  ) internal view returns (bytes32) {\n    bytes32 value = map._values[key];\n    require(value != 0 || contains(map, key), errorMessage);\n    return value;\n  }\n\n  // UintToUintMap\n\n  struct UintToUintMap {\n    Bytes32ToBytes32Map _inner;\n  }\n\n  /**\n   * @dev Adds a key-value pair to a map, or updates the value for an existing\n   * key. O(1).\n   *\n   * Returns true if the key was added to the map, that is if it was not\n   * already present.\n   */\n  function set(\n    UintToUintMap storage map,\n    uint256 key,\n    uint256 value\n  ) internal returns (bool) {\n    return set(map._inner, bytes32(key), bytes32(value));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the key was removed from the map, that is if it was present.\n   */\n  function remove(UintToUintMap storage map, uint256 key) internal returns (bool) {\n    return remove(map._inner, bytes32(key));\n  }\n\n  /**\n   * @dev Returns true if the key is in the map. O(1).\n   */\n  function contains(UintToUintMap storage map, uint256 key) internal view returns (bool) {\n    return contains(map._inner, bytes32(key));\n  }\n\n  /**\n   * @dev Returns the number of elements in the map. O(1).\n   */\n  function length(UintToUintMap storage map) internal view returns (uint256) {\n    return length(map._inner);\n  }\n\n  /**\n   * @dev Returns the element stored at position `index` in the set. O(1).\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(UintToUintMap storage map, uint256 index) internal view returns (uint256, uint256) {\n    (bytes32 key, bytes32 value) = at(map._inner, index);\n    return (uint256(key), uint256(value));\n  }\n\n  /**\n   * @dev Tries to returns the value associated with `key`. O(1).\n   * Does not revert if `key` is not in the map.\n   */\n  function tryGet(UintToUintMap storage map, uint256 key) internal view returns (bool, uint256) {\n    (bool success, bytes32 value) = tryGet(map._inner, bytes32(key));\n    return (success, uint256(value));\n  }\n\n  /**\n   * @dev Returns the value associated with `key`. O(1).\n   *\n   * Requirements:\n   *\n   * - `key` must be in the map.\n   */\n  function get(UintToUintMap storage map, uint256 key) internal view returns (uint256) {\n    return uint256(get(map._inner, bytes32(key)));\n  }\n\n  /**\n   * @dev Same as {get}, with a custom error message when `key` is not in the map.\n   *\n   * CAUTION: This function is deprecated because it requires allocating memory for the error\n   * message unnecessarily. For custom revert reasons use {tryGet}.\n   */\n  function get(\n    UintToUintMap storage map,\n    uint256 key,\n    string memory errorMessage\n  ) internal view returns (uint256) {\n    return uint256(get(map._inner, bytes32(key), errorMessage));\n  }\n\n  // UintToAddressMap\n\n  struct UintToAddressMap {\n    Bytes32ToBytes32Map _inner;\n  }\n\n  /**\n   * @dev Adds a key-value pair to a map, or updates the value for an existing\n   * key. O(1).\n   *\n   * Returns true if the key was added to the map, that is if it was not\n   * already present.\n   */\n  function set(\n    UintToAddressMap storage map,\n    uint256 key,\n    address value\n  ) internal returns (bool) {\n    return set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the key was removed from the map, that is if it was present.\n   */\n  function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\n    return remove(map._inner, bytes32(key));\n  }\n\n  /**\n   * @dev Returns true if the key is in the map. O(1).\n   */\n  function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\n    return contains(map._inner, bytes32(key));\n  }\n\n  /**\n   * @dev Returns the number of elements in the map. O(1).\n   */\n  function length(UintToAddressMap storage map) internal view returns (uint256) {\n    return length(map._inner);\n  }\n\n  /**\n   * @dev Returns the element stored at position `index` in the set. O(1).\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\n    (bytes32 key, bytes32 value) = at(map._inner, index);\n    return (uint256(key), address(uint160(uint256(value))));\n  }\n\n  /**\n   * @dev Tries to returns the value associated with `key`. O(1).\n   * Does not revert if `key` is not in the map.\n   */\n  function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\n    (bool success, bytes32 value) = tryGet(map._inner, bytes32(key));\n    return (success, address(uint160(uint256(value))));\n  }\n\n  /**\n   * @dev Returns the value associated with `key`. O(1).\n   *\n   * Requirements:\n   *\n   * - `key` must be in the map.\n   */\n  function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\n    return address(uint160(uint256(get(map._inner, bytes32(key)))));\n  }\n\n  /**\n   * @dev Same as {get}, with a custom error message when `key` is not in the map.\n   *\n   * CAUTION: This function is deprecated because it requires allocating memory for the error\n   * message unnecessarily. For custom revert reasons use {tryGet}.\n   */\n  function get(\n    UintToAddressMap storage map,\n    uint256 key,\n    string memory errorMessage\n  ) internal view returns (address) {\n    return address(uint160(uint256(get(map._inner, bytes32(key), errorMessage))));\n  }\n\n  // AddressToUintMap\n\n  struct AddressToUintMap {\n    Bytes32ToBytes32Map _inner;\n  }\n\n  /**\n   * @dev Adds a key-value pair to a map, or updates the value for an existing\n   * key. O(1).\n   *\n   * Returns true if the key was added to the map, that is if it was not\n   * already present.\n   */\n  function set(\n    AddressToUintMap storage map,\n    address key,\n    uint256 value\n  ) internal returns (bool) {\n    return set(map._inner, bytes32(uint256(uint160(key))), bytes32(value));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the key was removed from the map, that is if it was present.\n   */\n  function remove(AddressToUintMap storage map, address key) internal returns (bool) {\n    return remove(map._inner, bytes32(uint256(uint160(key))));\n  }\n\n  /**\n   * @dev Returns true if the key is in the map. O(1).\n   */\n  function contains(AddressToUintMap storage map, address key) internal view returns (bool) {\n    return contains(map._inner, bytes32(uint256(uint160(key))));\n  }\n\n  /**\n   * @dev Returns the number of elements in the map. O(1).\n   */\n  function length(AddressToUintMap storage map) internal view returns (uint256) {\n    return length(map._inner);\n  }\n\n  /**\n   * @dev Returns the element stored at position `index` in the set. O(1).\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(AddressToUintMap storage map, uint256 index) internal view returns (address, uint256) {\n    (bytes32 key, bytes32 value) = at(map._inner, index);\n    return (address(uint160(uint256(key))), uint256(value));\n  }\n\n  /**\n   * @dev Tries to returns the value associated with `key`. O(1).\n   * Does not revert if `key` is not in the map.\n   */\n  function tryGet(AddressToUintMap storage map, address key) internal view returns (bool, uint256) {\n    (bool success, bytes32 value) = tryGet(map._inner, bytes32(uint256(uint160(key))));\n    return (success, uint256(value));\n  }\n\n  /**\n   * @dev Returns the value associated with `key`. O(1).\n   *\n   * Requirements:\n   *\n   * - `key` must be in the map.\n   */\n  function get(AddressToUintMap storage map, address key) internal view returns (uint256) {\n    return uint256(get(map._inner, bytes32(uint256(uint160(key)))));\n  }\n\n  /**\n   * @dev Same as {get}, with a custom error message when `key` is not in the map.\n   *\n   * CAUTION: This function is deprecated because it requires allocating memory for the error\n   * message unnecessarily. For custom revert reasons use {tryGet}.\n   */\n  function get(\n    AddressToUintMap storage map,\n    address key,\n    string memory errorMessage\n  ) internal view returns (uint256) {\n    return uint256(get(map._inner, bytes32(uint256(uint160(key))), errorMessage));\n  }\n\n  // Bytes32ToUintMap\n\n  struct Bytes32ToUintMap {\n    Bytes32ToBytes32Map _inner;\n  }\n\n  /**\n   * @dev Adds a key-value pair to a map, or updates the value for an existing\n   * key. O(1).\n   *\n   * Returns true if the key was added to the map, that is if it was not\n   * already present.\n   */\n  function set(\n    Bytes32ToUintMap storage map,\n    bytes32 key,\n    uint256 value\n  ) internal returns (bool) {\n    return set(map._inner, key, bytes32(value));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the key was removed from the map, that is if it was present.\n   */\n  function remove(Bytes32ToUintMap storage map, bytes32 key) internal returns (bool) {\n    return remove(map._inner, key);\n  }\n\n  /**\n   * @dev Returns true if the key is in the map. O(1).\n   */\n  function contains(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool) {\n    return contains(map._inner, key);\n  }\n\n  /**\n   * @dev Returns the number of elements in the map. O(1).\n   */\n  function length(Bytes32ToUintMap storage map) internal view returns (uint256) {\n    return length(map._inner);\n  }\n\n  /**\n   * @dev Returns the element stored at position `index` in the set. O(1).\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(Bytes32ToUintMap storage map, uint256 index) internal view returns (bytes32, uint256) {\n    (bytes32 key, bytes32 value) = at(map._inner, index);\n    return (key, uint256(value));\n  }\n\n  /**\n   * @dev Tries to returns the value associated with `key`. O(1).\n   * Does not revert if `key` is not in the map.\n   */\n  function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool, uint256) {\n    (bool success, bytes32 value) = tryGet(map._inner, key);\n    return (success, uint256(value));\n  }\n\n  /**\n   * @dev Returns the value associated with `key`. O(1).\n   *\n   * Requirements:\n   *\n   * - `key` must be in the map.\n   */\n  function get(Bytes32ToUintMap storage map, bytes32 key) internal view returns (uint256) {\n    return uint256(get(map._inner, key));\n  }\n\n  /**\n   * @dev Same as {get}, with a custom error message when `key` is not in the map.\n   *\n   * CAUTION: This function is deprecated because it requires allocating memory for the error\n   * message unnecessarily. For custom revert reasons use {tryGet}.\n   */\n  function get(\n    Bytes32ToUintMap storage map,\n    bytes32 key,\n    string memory errorMessage\n  ) internal view returns (uint256) {\n    return uint256(get(map._inner, key, errorMessage));\n  }\n}"
      },
      "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/utils/SafeERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/draft-IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n  using Address for address;\n\n  function safeTransfer(IERC20 token, address to, uint256 value) internal {\n    _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n  }\n\n  function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n    _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n  }\n\n  /**\n   * @dev Deprecated. This function has issues similar to the ones found in\n   * {IERC20-approve}, and its usage is discouraged.\n   *\n   * Whenever possible, use {safeIncreaseAllowance} and\n   * {safeDecreaseAllowance} instead.\n   */\n  function safeApprove(IERC20 token, address spender, uint256 value) internal {\n    // safeApprove should only be called when setting an initial allowance,\n    // or when resetting it to zero. To increase and decrease it, use\n    // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n    require(\n      (value == 0) || (token.allowance(address(this), spender) == 0),\n      \"SafeERC20: approve from non-zero to non-zero allowance\"\n    );\n    _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n  }\n\n  function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n    uint256 newAllowance = token.allowance(address(this), spender) + value;\n    _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n  }\n\n  function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n    unchecked {\n      uint256 oldAllowance = token.allowance(address(this), spender);\n      require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n      uint256 newAllowance = oldAllowance - value;\n      _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n    }\n  }\n\n  function safePermit(\n    IERC20Permit token,\n    address owner,\n    address spender,\n    uint256 value,\n    uint256 deadline,\n    uint8 v,\n    bytes32 r,\n    bytes32 s\n  ) internal {\n    uint256 nonceBefore = token.nonces(owner);\n    token.permit(owner, spender, value, deadline, v, r, s);\n    uint256 nonceAfter = token.nonces(owner);\n    require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n  }\n\n  /**\n   * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n   * on the return value: the return value is optional (but if data is returned, it must not be false).\n   * @param token The token targeted by the call.\n   * @param data The call data (encoded using abi.encode or one of its variants).\n   */\n  function _callOptionalReturn(IERC20 token, bytes memory data) private {\n    // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n    // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n    // the target address contains contract code and also asserts for success in the low-level call.\n\n    bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n    if (returndata.length > 0) {\n      // Return data is optional\n      require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n    }\n  }\n}\n"
      },
      "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n  /**\n   * @dev Emitted when `value` tokens are moved from one account (`from`) to\n   * another (`to`).\n   *\n   * Note that `value` may be zero.\n   */\n  event Transfer(address indexed from, address indexed to, uint256 value);\n\n  /**\n   * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n   * a call to {approve}. `value` is the new allowance.\n   */\n  event Approval(address indexed owner, address indexed spender, uint256 value);\n\n  /**\n   * @dev Returns the amount of tokens in existence.\n   */\n  function totalSupply() external view returns (uint256);\n\n  /**\n   * @dev Returns the amount of tokens owned by `account`.\n   */\n  function balanceOf(address account) external view returns (uint256);\n\n  /**\n   * @dev Moves `amount` tokens from the caller's account to `to`.\n   *\n   * Returns a boolean value indicating whether the operation succeeded.\n   *\n   * Emits a {Transfer} event.\n   */\n  function transfer(address to, uint256 amount) external returns (bool);\n\n  /**\n   * @dev Returns the remaining number of tokens that `spender` will be\n   * allowed to spend on behalf of `owner` through {transferFrom}. This is\n   * zero by default.\n   *\n   * This value changes when {approve} or {transferFrom} are called.\n   */\n  function allowance(address owner, address spender) external view returns (uint256);\n\n  /**\n   * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n   *\n   * Returns a boolean value indicating whether the operation succeeded.\n   *\n   * IMPORTANT: Beware that changing an allowance with this method brings the risk\n   * that someone may use both the old and the new allowance by unfortunate\n   * transaction ordering. One possible solution to mitigate this race\n   * condition is to first reduce the spender's allowance to 0 and set the\n   * desired value afterwards:\n   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n   *\n   * Emits an {Approval} event.\n   */\n  function approve(address spender, uint256 amount) external returns (bool);\n\n  /**\n   * @dev Moves `amount` tokens from `from` to `to` using the\n   * allowance mechanism. `amount` is then deducted from the caller's\n   * allowance.\n   *\n   * Returns a boolean value indicating whether the operation succeeded.\n   *\n   * Emits a {Transfer} event.\n   */\n  function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n"
      },
      "@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IAny2EVMMessageReceiver} from \"../interfaces/IAny2EVMMessageReceiver.sol\";\n\nimport {Client} from \"../libraries/Client.sol\";\n\nimport {IERC165} from \"../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/introspection/IERC165.sol\";\n\n/// @title CCIPReceiver - Base contract for CCIP applications that can receive messages.\nabstract contract CCIPReceiver is IAny2EVMMessageReceiver, IERC165 {\n  address internal immutable i_router;\n\n  constructor(address router) {\n    if (router == address(0)) revert InvalidRouter(address(0));\n    i_router = router;\n  }\n\n  /// @notice IERC165 supports an interfaceId\n  /// @param interfaceId The interfaceId to check\n  /// @return true if the interfaceId is supported\n  /// @dev Should indicate whether the contract implements IAny2EVMMessageReceiver\n  /// e.g. return interfaceId == type(IAny2EVMMessageReceiver).interfaceId || interfaceId == type(IERC165).interfaceId\n  /// This allows CCIP to check if ccipReceive is available before calling it.\n  /// If this returns false or reverts, only tokens are transferred to the receiver.\n  /// If this returns true, tokens are transferred and ccipReceive is called atomically.\n  /// Additionally, if the receiver address does not have code associated with\n  /// it at the time of execution (EXTCODESIZE returns 0), only tokens will be transferred.\n  function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) {\n    return interfaceId == type(IAny2EVMMessageReceiver).interfaceId || interfaceId == type(IERC165).interfaceId;\n  }\n\n  /// @inheritdoc IAny2EVMMessageReceiver\n  function ccipReceive(Client.Any2EVMMessage calldata message) external virtual override onlyRouter {\n    _ccipReceive(message);\n  }\n\n  /// @notice Override this function in your implementation.\n  /// @param message Any2EVMMessage\n  function _ccipReceive(Client.Any2EVMMessage memory message) internal virtual;\n\n  /////////////////////////////////////////////////////////////////////\n  // Plumbing\n  /////////////////////////////////////////////////////////////////////\n\n  /// @notice Return the current router\n  /// @return i_router address\n  function getRouter() public view returns (address) {\n    return address(i_router);\n  }\n\n  error InvalidRouter(address router);\n\n  /// @dev only calls from the set router are accepted.\n  modifier onlyRouter() {\n    if (msg.sender != address(i_router)) revert InvalidRouter(msg.sender);\n    _;\n  }\n}\n"
      },
      "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// End consumer library.\nlibrary Client {\n  /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers.\n  struct EVMTokenAmount {\n    address token; // token address on the local chain.\n    uint256 amount; // Amount of tokens.\n  }\n\n  struct Any2EVMMessage {\n    bytes32 messageId; // MessageId corresponding to ccipSend on source.\n    uint64 sourceChainSelector; // Source chain selector.\n    bytes sender; // abi.decode(sender) if coming from an EVM chain.\n    bytes data; // payload sent in original message.\n    EVMTokenAmount[] destTokenAmounts; // Tokens and their amounts in their destination chain representation.\n  }\n\n  // If extraArgs is empty bytes, the default is 200k gas limit.\n  struct EVM2AnyMessage {\n    bytes receiver; // abi.encode(receiver address) for dest EVM chains\n    bytes data; // Data payload\n    EVMTokenAmount[] tokenAmounts; // Token transfers\n    address feeToken; // Address of feeToken. address(0) means you will send msg.value.\n    bytes extraArgs; // Populate this with _argsToBytes(EVMExtraArgsV1)\n  }\n\n  // bytes4(keccak256(\"CCIP EVMExtraArgsV1\"));\n  bytes4 public constant EVM_EXTRA_ARGS_V1_TAG = 0x97a657c9;\n  struct EVMExtraArgsV1 {\n    uint256 gasLimit;\n  }\n\n  function _argsToBytes(EVMExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {\n    return abi.encodeWithSelector(EVM_EXTRA_ARGS_V1_TAG, extraArgs);\n  }\n}\n"
      },
      "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Client} from \"../libraries/Client.sol\";\n\ninterface IRouterClient {\n  error UnsupportedDestinationChain(uint64 destChainSelector);\n  error InsufficientFeeTokenAmount();\n  error InvalidMsgValue();\n\n  /// @notice Checks if the given chain ID is supported for sending/receiving.\n  /// @param chainSelector The chain to check.\n  /// @return supported is true if it is supported, false if not.\n  function isChainSupported(uint64 chainSelector) external view returns (bool supported);\n\n  /// @notice Gets a list of all supported tokens which can be sent or received\n  /// to/from a given chain id.\n  /// @param chainSelector The chainSelector.\n  /// @return tokens The addresses of all tokens that are supported.\n  function getSupportedTokens(uint64 chainSelector) external view returns (address[] memory tokens);\n\n  /// @param destinationChainSelector The destination chainSelector\n  /// @param message The cross-chain CCIP message including data and/or tokens\n  /// @return fee returns execution fee for the message\n  /// delivery to destination chain, denominated in the feeToken specified in the message.\n  /// @dev Reverts with appropriate reason upon invalid message.\n  function getFee(\n    uint64 destinationChainSelector,\n    Client.EVM2AnyMessage memory message\n  ) external view returns (uint256 fee);\n\n  /// @notice Request a message to be sent to the destination chain\n  /// @param destinationChainSelector The destination chain ID\n  /// @param message The cross-chain CCIP message including data and/or tokens\n  /// @return messageId The message ID\n  /// @dev Note if msg.value is larger than the required fee (from getFee) we accept\n  /// the overpayment with no refund.\n  /// @dev Reverts with appropriate reason upon invalid message.\n  function ccipSend(\n    uint64 destinationChainSelector,\n    Client.EVM2AnyMessage calldata message\n  ) external payable returns (bytes32);\n}\n"
      },
      "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/utils/structs/EnumerableSet.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n  // To implement this library for multiple types with as little code\n  // repetition as possible, we write it in terms of a generic Set type with\n  // bytes32 values.\n  // The Set implementation uses private functions, and user-facing\n  // implementations (such as AddressSet) are just wrappers around the\n  // underlying Set.\n  // This means that we can only create new EnumerableSets for types that fit\n  // in bytes32.\n\n  struct Set {\n    // Storage of set values\n    bytes32[] _values;\n    // Position of the value in the `values` array, plus 1 because index 0\n    // means a value is not in the set.\n    mapping(bytes32 => uint256) _indexes;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function _add(Set storage set, bytes32 value) private returns (bool) {\n    if (!_contains(set, value)) {\n      set._values.push(value);\n      // The value is stored at length-1, but we add 1 to all indexes\n      // and use 0 as a sentinel value\n      set._indexes[value] = set._values.length;\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function _remove(Set storage set, bytes32 value) private returns (bool) {\n    // We read and store the value's index to prevent multiple reads from the same storage slot\n    uint256 valueIndex = set._indexes[value];\n\n    if (valueIndex != 0) {\n      // Equivalent to contains(set, value)\n      // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n      // the array, and then remove the last element (sometimes called as 'swap and pop').\n      // This modifies the order of the array, as noted in {at}.\n\n      uint256 toDeleteIndex = valueIndex - 1;\n      uint256 lastIndex = set._values.length - 1;\n\n      if (lastIndex != toDeleteIndex) {\n        bytes32 lastValue = set._values[lastIndex];\n\n        // Move the last value to the index where the value to delete is\n        set._values[toDeleteIndex] = lastValue;\n        // Update the index for the moved value\n        set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n      }\n\n      // Delete the slot where the moved value was stored\n      set._values.pop();\n\n      // Delete the index for the deleted slot\n      delete set._indexes[value];\n\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function _contains(Set storage set, bytes32 value) private view returns (bool) {\n    return set._indexes[value] != 0;\n  }\n\n  /**\n   * @dev Returns the number of values on the set. O(1).\n   */\n  function _length(Set storage set) private view returns (uint256) {\n    return set._values.length;\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function _at(Set storage set, uint256 index) private view returns (bytes32) {\n    return set._values[index];\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function _values(Set storage set) private view returns (bytes32[] memory) {\n    return set._values;\n  }\n\n  // Bytes32Set\n\n  struct Bytes32Set {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n    return _add(set._inner, value);\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n    return _remove(set._inner, value);\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n    return _contains(set._inner, value);\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(Bytes32Set storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n    return _at(set._inner, index);\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n    bytes32[] memory store = _values(set._inner);\n    bytes32[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n\n  // AddressSet\n\n  struct AddressSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(AddressSet storage set, address value) internal returns (bool) {\n    return _add(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(AddressSet storage set, address value) internal returns (bool) {\n    return _remove(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(AddressSet storage set, address value) internal view returns (bool) {\n    return _contains(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(AddressSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(AddressSet storage set, uint256 index) internal view returns (address) {\n    return address(uint160(uint256(_at(set._inner, index))));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(AddressSet storage set) internal view returns (address[] memory) {\n    bytes32[] memory store = _values(set._inner);\n    address[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n\n  // UintSet\n\n  struct UintSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(UintSet storage set, uint256 value) internal returns (bool) {\n    return _add(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(UintSet storage set, uint256 value) internal returns (bool) {\n    return _remove(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n    return _contains(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(UintSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n    return uint256(_at(set._inner, index));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(UintSet storage set) internal view returns (uint256[] memory) {\n    bytes32[] memory store = _values(set._inner);\n    uint256[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n}\n"
      },
      "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/utils/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n  /**\n   * @dev Returns true if `account` is a contract.\n   *\n   * [IMPORTANT]\n   * ====\n   * It is unsafe to assume that an address for which this function returns\n   * false is an externally-owned account (EOA) and not a contract.\n   *\n   * Among others, `isContract` will return false for the following\n   * types of addresses:\n   *\n   *  - an externally-owned account\n   *  - a contract in construction\n   *  - an address where a contract will be created\n   *  - an address where a contract lived, but was destroyed\n   * ====\n   *\n   * [IMPORTANT]\n   * ====\n   * You shouldn't rely on `isContract` to protect against flash loan attacks!\n   *\n   * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n   * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n   * constructor.\n   * ====\n   */\n  function isContract(address account) internal view returns (bool) {\n    // This method relies on extcodesize/address.code.length, which returns 0\n    // for contracts in construction, since the code is only stored at the end\n    // of the constructor execution.\n\n    return account.code.length > 0;\n  }\n\n  /**\n   * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n   * `recipient`, forwarding all available gas and reverting on errors.\n   *\n   * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n   * of certain opcodes, possibly making contracts go over the 2300 gas limit\n   * imposed by `transfer`, making them unable to receive funds via\n   * `transfer`. {sendValue} removes this limitation.\n   *\n   * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n   *\n   * IMPORTANT: because control is transferred to `recipient`, care must be\n   * taken to not create reentrancy vulnerabilities. Consider using\n   * {ReentrancyGuard} or the\n   * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n   */\n  function sendValue(address payable recipient, uint256 amount) internal {\n    require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n    (bool success, ) = recipient.call{value: amount}(\"\");\n    require(success, \"Address: unable to send value, recipient may have reverted\");\n  }\n\n  /**\n   * @dev Performs a Solidity function call using a low level `call`. A\n   * plain `call` is an unsafe replacement for a function call: use this\n   * function instead.\n   *\n   * If `target` reverts with a revert reason, it is bubbled up by this\n   * function (like regular Solidity function calls).\n   *\n   * Returns the raw returned data. To convert to the expected return value,\n   * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n   *\n   * Requirements:\n   *\n   * - `target` must be a contract.\n   * - calling `target` with `data` must not revert.\n   *\n   * _Available since v3.1._\n   */\n  function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n    return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n   * `errorMessage` as a fallback revert reason when `target` reverts.\n   *\n   * _Available since v3.1._\n   */\n  function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n    return functionCallWithValue(target, data, 0, errorMessage);\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n   * but also transferring `value` wei to `target`.\n   *\n   * Requirements:\n   *\n   * - the calling contract must have an ETH balance of at least `value`.\n   * - the called Solidity function must be `payable`.\n   *\n   * _Available since v3.1._\n   */\n  function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n    return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n   * with `errorMessage` as a fallback revert reason when `target` reverts.\n   *\n   * _Available since v3.1._\n   */\n  function functionCallWithValue(\n    address target,\n    bytes memory data,\n    uint256 value,\n    string memory errorMessage\n  ) internal returns (bytes memory) {\n    require(address(this).balance >= value, \"Address: insufficient balance for call\");\n    (bool success, bytes memory returndata) = target.call{value: value}(data);\n    return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n   * but performing a static call.\n   *\n   * _Available since v3.3._\n   */\n  function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n    return functionStaticCall(target, data, \"Address: low-level static call failed\");\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n   * but performing a static call.\n   *\n   * _Available since v3.3._\n   */\n  function functionStaticCall(\n    address target,\n    bytes memory data,\n    string memory errorMessage\n  ) internal view returns (bytes memory) {\n    (bool success, bytes memory returndata) = target.staticcall(data);\n    return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n   * but performing a delegate call.\n   *\n   * _Available since v3.4._\n   */\n  function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n    return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n   * but performing a delegate call.\n   *\n   * _Available since v3.4._\n   */\n  function functionDelegateCall(\n    address target,\n    bytes memory data,\n    string memory errorMessage\n  ) internal returns (bytes memory) {\n    (bool success, bytes memory returndata) = target.delegatecall(data);\n    return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n  }\n\n  /**\n   * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n   * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n   *\n   * _Available since v4.8._\n   */\n  function verifyCallResultFromTarget(\n    address target,\n    bool success,\n    bytes memory returndata,\n    string memory errorMessage\n  ) internal view returns (bytes memory) {\n    if (success) {\n      if (returndata.length == 0) {\n        // only check isContract if the call was successful and the return data is empty\n        // otherwise we already know that it was a contract\n        require(isContract(target), \"Address: call to non-contract\");\n      }\n      return returndata;\n    } else {\n      _revert(returndata, errorMessage);\n    }\n  }\n\n  /**\n   * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n   * revert reason or using the provided one.\n   *\n   * _Available since v4.3._\n   */\n  function verifyCallResult(\n    bool success,\n    bytes memory returndata,\n    string memory errorMessage\n  ) internal pure returns (bytes memory) {\n    if (success) {\n      return returndata;\n    } else {\n      _revert(returndata, errorMessage);\n    }\n  }\n\n  function _revert(bytes memory returndata, string memory errorMessage) private pure {\n    // Look for revert reason and bubble it up if present\n    if (returndata.length > 0) {\n      // The easiest way to bubble the revert reason is using memory via assembly\n      /// @solidity memory-safe-assembly\n      assembly {\n        let returndata_size := mload(returndata)\n        revert(add(32, returndata), returndata_size)\n      }\n    } else {\n      revert(errorMessage);\n    }\n  }\n}\n"
      },
      "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/extensions/draft-IERC20Permit.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n  /**\n   * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n   * given ``owner``'s signed approval.\n   *\n   * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n   * ordering also apply here.\n   *\n   * Emits an {Approval} event.\n   *\n   * Requirements:\n   *\n   * - `spender` cannot be the zero address.\n   * - `deadline` must be a timestamp in the future.\n   * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n   * over the EIP712-formatted function arguments.\n   * - the signature must use ``owner``'s current nonce (see {nonces}).\n   *\n   * For more information on the signature format, see the\n   * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n   * section].\n   */\n  function permit(\n    address owner,\n    address spender,\n    uint256 value,\n    uint256 deadline,\n    uint8 v,\n    bytes32 r,\n    bytes32 s\n  ) external;\n\n  /**\n   * @dev Returns the current nonce for `owner`. This value must be\n   * included whenever a signature is generated for {permit}.\n   *\n   * Every successful call to {permit} increases ``owner``'s nonce by one. This\n   * prevents a signature from being used multiple times.\n   */\n  function nonces(address owner) external view returns (uint256);\n\n  /**\n   * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n   */\n  // solhint-disable-next-line func-name-mixedcase\n  function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"
      },
      "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/utils/introspection/IERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}"
      },
      "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IAny2EVMMessageReceiver.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Client} from \"../libraries/Client.sol\";\n\n/// @notice Application contracts that intend to receive messages from\n/// the router should implement this interface.\ninterface IAny2EVMMessageReceiver {\n  /// @notice Called by the Router to deliver a message.\n  /// If this reverts, any token transfers also revert. The message\n  /// will move to a FAILED state and become available for manual execution.\n  /// @param message CCIP Message\n  /// @dev Note ensure you check the msg.sender is the OffRampRouter\n  function ccipReceive(Client.Any2EVMMessage calldata message) external;\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "abi"
          ]
        }
      }
    }
  }}