creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/bridge/L1/XZerogBridge.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.8.4 <0.9.0;\n\nimport \"./XZerogBridgeStorage.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport { IERC20MetadataUpgradeable } from\n    \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../connext/core/IXReceiver.sol\";\nimport \"../connext/core/IWeth.sol\";\nimport \"../xerc20/interfaces/IXERC20.sol\";\nimport { Client } from \"@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { LRTConfigRoleChecker, ILRTConfig } from \"../../utils/LRTConfigRoleChecker.sol\";\n\ncontract XZerogBridge is\n    IXReceiver,\n    Initializable,\n    ReentrancyGuardUpgradeable,\n    XZerogBridgeStorage,\n    LRTConfigRoleChecker\n{\n    using SafeERC20 for IERC20;\n\n    /// @dev Event emitted when bridge triggers zgETH mint\n    event ZgETHMinted(\n        bytes32 transferId, uint256 amountDeposited, uint32 origin, address originSender, uint256 zgETHMinted\n    );\n\n    /// @dev Event emitted when a message is sent to another chain.\n    // The chain selector of the destination chain.\n    // The address of the receiver on the destination chain.\n    // The exchange rate sent.\n    // the token address used to pay CCIP fees.\n    // The fees paid for sending the CCIP message.\n    event MessageSent( // The unique ID of the CCIP message.\n        bytes32 indexed messageId,\n        uint64 indexed destinationChainSelector,\n        address receiver,\n        uint256 exchangeRate,\n        address feeToken,\n        uint256 fees\n    );\n\n    event ConnextMessageSent( // The chain domain Id of the destination chain.\n        // The address of the receiver on the destination chain.\n        // The exchange rate sent.\n        // The fees paid for sending the Connext message.\n    uint32 indexed destinationChainDomain, address receiver, uint256 exchangeRate, uint256 fees);\n\n    /// @dev - This contract expects all tokens to have 18 decimals for pricing\n    uint8 public constant EXPECTED_DECIMALS = 18;\n\n    /// @dev - LrtConfig can be set only once;\n    bool public isSetLrtConfig = false;\n\n    /// @dev Prevents implementation contract from being initialized.\n    /// @custom:oz-upgrades-unsafe-allow constructor\n    constructor() {\n        _disableInitializers();\n    }\n\n    /// @dev Initializes the contract with initial vars\n    function initialize(\n        address _zgETH,\n        address _xzgETH,\n        address _lrtDepositPool,\n        address _wETH,\n        address _xzgETHLockbox,\n        address _connext,\n        address _linkRouterClient,\n        address _lrtOracle,\n        address _linkToken\n    )\n        public\n        initializer\n    {\n        // Verify non-zero addresses on inputs\n        if (\n            _zgETH == address(0) || _xzgETH == address(0) || _lrtDepositPool == address(0) || _wETH == address(0)\n                || _xzgETHLockbox == address(0) || _connext == address(0) || _linkRouterClient == address(0)\n                || _lrtOracle == address(0) || _linkToken == address(0)\n        ) {\n            revert InvalidZeroInput();\n        }\n\n        // Verify all tokens have 18 decimals\n        uint8 decimals = IERC20MetadataUpgradeable(_zgETH).decimals();\n        if (decimals != EXPECTED_DECIMALS) {\n            revert InvalidTokenDecimals(EXPECTED_DECIMALS, decimals);\n        }\n        decimals = IERC20MetadataUpgradeable(_xzgETH).decimals();\n        if (decimals != EXPECTED_DECIMALS) {\n            revert InvalidTokenDecimals(EXPECTED_DECIMALS, decimals);\n        }\n        decimals = IERC20MetadataUpgradeable(_wETH).decimals();\n        if (decimals != EXPECTED_DECIMALS) {\n            revert InvalidTokenDecimals(EXPECTED_DECIMALS, decimals);\n        }\n        decimals = IERC20MetadataUpgradeable(_linkToken).decimals();\n        if (decimals != EXPECTED_DECIMALS) {\n            revert InvalidTokenDecimals(EXPECTED_DECIMALS, decimals);\n        }\n\n        // Save off inputs\n        zgETH = IERC20(_zgETH);\n        xzgETH = IERC20(_xzgETH);\n        lrtDepositPool = ILRTDepositPool(_lrtDepositPool);\n        wETH = IERC20(_wETH);\n        xzgETHLockbox = IXERC20Lockbox(_xzgETHLockbox);\n        connext = IConnext(_connext);\n        linkRouterClient = IRouterClient(_linkRouterClient);\n        lrtOracle = ILRTOracle(_lrtOracle);\n        linkToken = LinkTokenInterface(_linkToken);\n    }\n\n    /**\n     * @notice  Accepts collateral from the bridge\n     * @dev     This function will take all collateral and deposit it into Zerog\n     *          The zgETH from the deposit will be sent to the lockbox to be wrapped into xzgETH\n     *          The xzgETH will be burned so that the xzgETH on the L2 can be unwrapped for zgETH later\n     * @notice  WARNING: This function does NOT whitelist who can send funds from the L2 via Connext.  Users should NOT\n     *          send funds directly to this contract.  A user who sends funds directly to this contract will cause\n     *          the tokens on the L2 to become over collateralized and will be a \"donation\" to protocol.  Only use\n     *          the deposit contracts on the L2 to send funds to this contract.\n     */\n    function xReceive(\n        bytes32 _transferId,\n        uint256 _amount,\n        address _asset,\n        address _originSender,\n        uint32 _origin,\n        bytes memory\n    )\n        external\n        nonReentrant\n        returns (bytes memory)\n    {\n        // Only allow incoming messages from the Connext contract\n        if (msg.sender != address(connext)) {\n            revert InvalidSender(address(connext), msg.sender);\n        }\n\n        // Check that the token received is wETH\n        if (_asset != address(wETH)) {\n            revert InvalidTokenReceived();\n        }\n\n        // Check that the amount sent is greater than 0\n        if (_amount == 0) {\n            revert InvalidZeroInput();\n        }\n\n        // Get the balance of ETH before the withdraw\n        uint256 ethBalanceBeforeWithdraw = address(this).balance;\n\n        // Unwrap the WETH\n        IWeth(address(wETH)).withdraw(_amount);\n\n        // Get the amount of ETH\n        uint256 ethAmount = address(this).balance - ethBalanceBeforeWithdraw;\n\n        // Get the amonut of zgETH before the deposit\n        uint256 zgETHBalanceBeforeDeposit = zgETH.balanceOf(address(this));\n\n        // Deposit it into Zerog LRTDepositPool\n        lrtDepositPool.depositETH{ value: ethAmount }(0, \"Origin\");\n\n        // Get the amount of zgETH that was minted\n        uint256 zgETHAmount = zgETH.balanceOf(address(this)) - zgETHBalanceBeforeDeposit;\n\n        // Approve the lockbox to spend the zgETH\n        zgETH.safeApprove(address(xzgETHLockbox), zgETHAmount);\n\n        // Get the xzgETH balance before the deposit\n        uint256 xzgETHBalanceBeforeDeposit = xzgETH.balanceOf(address(this));\n\n        // Send to the lockbox to be wrapped into xzgETH\n        xzgETHLockbox.deposit(zgETHAmount);\n\n        // Get the amount of xzgETH that was minted\n        uint256 xzgETHAmount = xzgETH.balanceOf(address(this)) - xzgETHBalanceBeforeDeposit;\n\n        // Burn it - it was already minted on the L2\n        IXERC20(address(xzgETH)).burn(address(this), xzgETHAmount);\n\n        // Emit the event\n        emit ZgETHMinted(_transferId, _amount, _origin, _originSender, zgETHAmount);\n\n        // Return 0 for success\n        bytes memory returnData = new bytes(0);\n        return returnData;\n    }\n\n    /**\n     * @notice  Send the price feed to the L1\n     * @dev     Calls the zgETHPrice() function to get the current zgETH to ETH price and sends to the L2.\n     *          This should be a permissioned call for only OPERATOR_ROLE role\n     * @param _destinationParam array of CCIP destination chain param\n     * @param _connextDestinationParam array of connext destination chain param\n     */\n    function sendPrice(\n        CCIPDestinationParam[] calldata _destinationParam,\n        ConnextDestinationParam[] calldata _connextDestinationParam\n    )\n        external\n        payable\n        onlyLRTOperator\n        nonReentrant\n    {\n        // call zgETHPrice() to get the current price of zgETH\n        uint256 exchangeRate = lrtOracle.zgETHPrice();\n        bytes memory _callData = abi.encode(exchangeRate, block.timestamp);\n        // send price feed to zerog CCIP receivers\n        for (uint256 i = 0; i < _destinationParam.length;) {\n            Client.EVM2AnyMessage memory evm2AnyMessage = Client.EVM2AnyMessage({\n                receiver: abi.encode(_destinationParam[i]._zerogReceiver), // ABI-encoded XZerogDepsot contract address\n                data: _callData, // ABI-encoded zgETH exchange rate with Timestamp\n                tokenAmounts: new Client.EVMTokenAmount[](0), // Empty array indicating no tokens are being sent\n                extraArgs: Client._argsToBytes(\n                    // Additional arguments, setting gas limit\n                    Client.EVMExtraArgsV1({ gasLimit: 200_000 })\n                    ),\n                // Set the feeToken  address, indicating LINK will be used for fees\n                feeToken: address(linkToken)\n            });\n\n            // Get the fee required to send the message\n            uint256 fees = linkRouterClient.getFee(_destinationParam[i].destinationChainSelector, evm2AnyMessage);\n\n            if (fees > linkToken.balanceOf(address(this))) {\n                revert NotEnoughBalance(linkToken.balanceOf(address(this)), fees);\n            }\n\n            // approve the Router to transfer LINK tokens on contract's behalf. It will spend the fees in LINK\n            linkToken.approve(address(linkRouterClient), fees);\n\n            // Send the message through the router and store the returned message ID\n            bytes32 messageId = linkRouterClient.ccipSend(_destinationParam[i].destinationChainSelector, evm2AnyMessage);\n\n            // Emit an event with message details\n            emit MessageSent(\n                messageId,\n                _destinationParam[i].destinationChainSelector,\n                _destinationParam[i]._zerogReceiver,\n                exchangeRate,\n                address(linkToken),\n                fees\n            );\n            unchecked {\n                ++i;\n            }\n        }\n\n        // send price feed to zerog connext receiver\n        for (uint256 i = 0; i < _connextDestinationParam.length;) {\n            connext.xcall{ value: _connextDestinationParam[i].relayerFee }(\n                _connextDestinationParam[i].destinationDomainId,\n                _connextDestinationParam[i]._zerogReceiver,\n                address(0),\n                msg.sender,\n                0,\n                0,\n                _callData\n            );\n\n            emit ConnextMessageSent(\n                _connextDestinationParam[i].destinationDomainId,\n                _connextDestinationParam[i]._zerogReceiver,\n                exchangeRate,\n                _connextDestinationParam[i].relayerFee\n            );\n\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    /**\n     * @notice  Sweeps accidental ETH value sent to the contract\n     * @dev     Restricted to be called by the LRTManager only.\n     * @param   _amount  amount of native asset\n     * @param   _to  destination address\n     */\n    function recoverNative(uint256 _amount, address _to) external onlyLRTManager {\n        payable(_to).transfer(_amount);\n    }\n\n    /**\n     * @notice  Sweeps accidental ERC20 value sent to the contract\n     * @dev     Restricted to be called by the LRTManager only.\n     * @param   _token  address of the ERC20 token\n     * @param   _amount  amount of ERC20 token\n     * @param   _to  destination address\n     */\n    function recoverERC20(address _token, uint256 _amount, address _to) external onlyLRTManager {\n        IERC20(_token).safeTransfer(_to, _amount);\n    }\n\n    /**\n     * @notice  Set LRTConfig address\n     * @param   _lrtConfig  address of the LRTConfig token\n     */\n    function setLrtConfig(address _lrtConfig) external {\n        if (isSetLrtConfig) {\n            revert AlreadySet();\n        }\n        isSetLrtConfig = true;\n        lrtConfig = ILRTConfig(_lrtConfig);\n    }\n\n    /**\n     * @notice Fallback function to handle ETH sent to the contract from unwrapping WETH\n     * @dev Warning: users should not send ETH directly to this contract!\n     */\n    receive() external payable { }\n}\n"
      },
      "contracts/bridge/L1/XZerogBridgeStorage.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.8.4 <0.9.0;\n\nimport \"./IXZerogBridge.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"../xerc20/interfaces/IXERC20Lockbox.sol\";\nimport \"../connext/core/IConnext.sol\";\nimport { IRouterClient } from \"@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol\";\nimport { ILRTDepositPool } from \"../../interfaces/ILRTDepositPool.sol\";\nimport { ILRTOracle } from \"../../interfaces/ILRTOracle.sol\";\nimport { LinkTokenInterface } from \"@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol\";\n\nabstract contract XZerogBridgeStorage is IXZerogBridge {\n    /// @notice The xzgETH token address\n    IERC20 public xzgETH;\n\n    /// @notice The zgETH token address\n    IERC20 public zgETH;\n\n    /// @notice The LRPDepositPool contract - deposits into the protocol are restaked here\n    ILRTDepositPool public lrtDepositPool;\n\n    /// @notice The wETH token address - will be sent via bridge from L2\n    IERC20 public wETH;\n\n    /// @notice The lockbox contract for zgETH - minted zgETH is sent here\n    IXERC20Lockbox public xzgETHLockbox;\n\n    /// @notice The address of the main Connext contract\n    IConnext public connext;\n\n    /// @notice The address of the LRTOracle Contract\n    ILRTOracle public lrtOracle;\n\n    /// @notice The address of the Chainlink CCIPv1.2.0 Router Client\n    IRouterClient public linkRouterClient;\n\n    /// @notice The address of Chainlink Token\n    LinkTokenInterface public linkToken;\n}\n"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     * @custom:oz-retyped-from bool\n     */\n    uint8 private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint8 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n     * constructor.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        bool isTopLevelCall = !_initializing;\n        require(\n            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n            \"Initializable: contract is already initialized\"\n        );\n        _initialized = 1;\n        if (isTopLevelCall) {\n            _initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            _initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: setting the version to 255 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint8 version) {\n        require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n        _initialized = version;\n        _initializing = true;\n        _;\n        _initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        require(!_initializing, \"Initializable: contract is initializing\");\n        if (_initialized != type(uint8).max) {\n            _initialized = type(uint8).max;\n            emit Initialized(type(uint8).max);\n        }\n    }\n\n    /**\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\n     */\n    function _getInitializedVersion() internal view returns (uint8) {\n        return _initialized;\n    }\n\n    /**\n     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _initializing;\n    }\n}\n"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"
      },
      "contracts/bridge/connext/core/IXReceiver.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface IXReceiver {\n    function xReceive(\n        bytes32 _transferId,\n        uint256 _amount,\n        address _asset,\n        address _originSender,\n        uint32 _origin,\n        bytes memory _callData\n    ) external returns (bytes memory);\n}\n"
      },
      "contracts/bridge/connext/core/IWeth.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface IWeth {\n    function deposit() external payable;\n\n    function withdraw(uint256 value) external;\n}\n"
      },
      "contracts/bridge/xerc20/interfaces/IXERC20.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >=0.8.4 <0.9.0;\n\ninterface IXERC20 {\n    /**\n     * @notice Emits when a lockbox is set\n     *\n     * @param _lockbox The address of the lockbox\n     */\n    event LockboxSet(address _lockbox);\n\n    /**\n     * @notice Emits when a limit is set\n     *\n     * @param _mintingLimit The updated minting limit we are setting to the bridge\n     * @param _burningLimit The updated burning limit we are setting to the bridge\n     * @param _bridge The address of the bridge we are setting the limit too\n     */\n    event BridgeLimitsSet(uint256 _mintingLimit, uint256 _burningLimit, address indexed _bridge);\n\n    /**\n     * @notice Reverts when a user with too low of a limit tries to call mint/burn\n     */\n    error IXERC20_NotHighEnoughLimits();\n\n    /**\n     * @notice Reverts when caller is not the factory\n     */\n    error IXERC20_NotFactory();\n\n    /**\n     * @notice Reverts when mint or burn value is 0\n     */\n    error IXERC20_INVALID_0_VALUE();\n\n    /**\n     * @notice Contains the full minting and burning data for a particular bridge\n     *\n     * @param minterParams The minting parameters for the bridge\n     * @param burnerParams The burning parameters for the bridge\n     */\n    struct Bridge {\n        BridgeParameters minterParams;\n        BridgeParameters burnerParams;\n    }\n\n    /**\n     * @notice Contains the mint or burn parameters for a bridge\n     *\n     * @param timestamp The timestamp of the last mint/burn\n     * @param ratePerSecond The rate per second of the bridge\n     * @param maxLimit The max limit of the bridge\n     * @param currentLimit The current limit of the bridge\n     */\n    struct BridgeParameters {\n        uint256 timestamp;\n        uint256 ratePerSecond;\n        uint256 maxLimit;\n        uint256 currentLimit;\n    }\n\n    /**\n     * @notice Sets the lockbox address\n     *\n     * @param _lockbox The address of the lockbox\n     */\n    function setLockbox(address _lockbox) external;\n\n    /**\n     * @notice Updates the limits of any bridge\n     * @dev Can only be called by the owner\n     * @param _mintingLimit The updated minting limit we are setting to the bridge\n     * @param _burningLimit The updated burning limit we are setting to the bridge\n     * @param _bridge The address of the bridge we are setting the limits too\n     */\n    function setLimits(address _bridge, uint256 _mintingLimit, uint256 _burningLimit) external;\n\n    /**\n     * @notice Returns the max limit of a minter\n     *\n     * @param _minter The minter we are viewing the limits of\n     *  @return _limit The limit the minter has\n     */\n    function mintingMaxLimitOf(address _minter) external view returns (uint256 _limit);\n\n    /**\n     * @notice Returns the max limit of a bridge\n     *\n     * @param _bridge the bridge we are viewing the limits of\n     * @return _limit The limit the bridge has\n     */\n    function burningMaxLimitOf(address _bridge) external view returns (uint256 _limit);\n\n    /**\n     * @notice Returns the current limit of a minter\n     *\n     * @param _minter The minter we are viewing the limits of\n     * @return _limit The limit the minter has\n     */\n    function mintingCurrentLimitOf(address _minter) external view returns (uint256 _limit);\n\n    /**\n     * @notice Returns the current limit of a bridge\n     *\n     * @param _bridge the bridge we are viewing the limits of\n     * @return _limit The limit the bridge has\n     */\n    function burningCurrentLimitOf(address _bridge) external view returns (uint256 _limit);\n\n    /**\n     * @notice Mints tokens for a user\n     * @dev Can only be called by a minter\n     * @param _user The address of the user who needs tokens minted\n     * @param _amount The amount of tokens being minted\n     */\n    function mint(address _user, uint256 _amount) external;\n\n    /**\n     * @notice Burns tokens for a user\n     * @dev Can only be called by a minter\n     * @param _user The address of the user who needs tokens burned\n     * @param _amount The amount of tokens being burned\n     */\n    function burn(address _user, uint256 _amount) external;\n}\n"
      },
      "node_modules/@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"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _status == _ENTERED;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"
      },
      "contracts/utils/LRTConfigRoleChecker.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.21;\n\nimport { UtilLib } from \"./UtilLib.sol\";\nimport { LRTConstants } from \"./LRTConstants.sol\";\n\nimport { ILRTConfig } from \"../interfaces/ILRTConfig.sol\";\n\nimport { IAccessControl } from \"@openzeppelin/contracts/access/IAccessControl.sol\";\n\n/// @title LRTConfigRoleChecker - LRT Config Role Checker Contract\n/// @notice Handles LRT config role checks\nabstract contract LRTConfigRoleChecker {\n    ILRTConfig public lrtConfig;\n\n    // events\n    event UpdatedLRTConfig(address indexed lrtConfig);\n\n    // modifiers\n    modifier onlyRole(bytes32 role) {\n        if (!IAccessControl(address(lrtConfig)).hasRole(role, msg.sender)) {\n            string memory roleStr = string(abi.encodePacked(role));\n            revert ILRTConfig.CallerNotLRTConfigAllowedRole(roleStr);\n        }\n        _;\n    }\n\n    modifier onlyLRTManager() {\n        if (!IAccessControl(address(lrtConfig)).hasRole(LRTConstants.MANAGER, msg.sender)) {\n            revert ILRTConfig.CallerNotLRTConfigManager();\n        }\n        _;\n    }\n\n    modifier onlyLRTOperator() {\n        if (!IAccessControl(address(lrtConfig)).hasRole(LRTConstants.OPERATOR_ROLE, msg.sender)) {\n            revert ILRTConfig.CallerNotLRTConfigOperator();\n        }\n        _;\n    }\n\n    modifier onlyLRTAdmin() {\n        if (!IAccessControl(address(lrtConfig)).hasRole(LRTConstants.DEFAULT_ADMIN_ROLE, msg.sender)) {\n            revert ILRTConfig.CallerNotLRTConfigAdmin();\n        }\n        _;\n    }\n\n    modifier onlySupportedAsset(address asset) {\n        if (!lrtConfig.isSupportedAsset(asset)) {\n            revert ILRTConfig.AssetNotSupported();\n        }\n        _;\n    }\n\n    // setters\n\n    /// @notice Updates the LRT config contract\n    /// @dev only callable by LRT admin\n    /// @param lrtConfigAddr the new LRT config contract Address\n    function updateLRTConfig(address lrtConfigAddr) external virtual onlyLRTAdmin {\n        UtilLib.checkNonZeroAddress(lrtConfigAddr);\n        lrtConfig = ILRTConfig(lrtConfigAddr);\n        emit UpdatedLRTConfig(lrtConfigAddr);\n    }\n}\n"
      },
      "contracts/bridge/L1/IXZerogBridge.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.8.4 <0.9.0;\n\ninterface IXZerogBridge {\n    /**\n     * @notice Contains destination data for CCIP call\n     *\n     * @param destinationChainSelector chainlink CCIP destination chain selector ID\n     * @param _zerogReceiver XZerogDeposit receiver contract\n     */\n    struct CCIPDestinationParam {\n        uint64 destinationChainSelector;\n        address _zerogReceiver;\n    }\n\n    /**\n     * @notice Contains destination data for Connext xCall\n     *\n     * @param destinationChainSelector chainlink Connext destination chain domain ID\n     * @param _zerogReceiver XZerogDeposit receiver contract\n     * @param relayerFee relayer Fee required for xCall\n     */\n    struct ConnextDestinationParam {\n        uint32 destinationDomainId;\n        address _zerogReceiver;\n        uint256 relayerFee;\n    }\n\n    function sendPrice(\n        CCIPDestinationParam[] calldata _destinationParam,\n        ConnextDestinationParam[] calldata _connextDestinationParam\n    )\n        external\n        payable;\n\n    // errors\n    error InvalidZeroInput();\n    error InvalidTokenDecimals(uint8 expected, uint8 actual);\n    error InvalidSender(address expectedSender, address actualSender);\n    error InvalidTokenReceived();\n    error NotEnoughBalance(uint256 currentBalance, uint256 calculatedFees);\n    error AlreadySet();\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/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    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\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    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\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            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n            _callOptionalReturn(token, approvalCall);\n        }\n    }\n\n    /**\n     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n     * Revert on invalid signature.\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        require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation 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     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\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 cannot use {Address-functionCall} here since this should return false\n        // and not revert is the subcall reverts.\n\n        (bool success, bytes memory returndata) = address(token).call(data);\n        return\n            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n    }\n}\n"
      },
      "contracts/bridge/xerc20/interfaces/IXERC20Lockbox.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >=0.8.4 <0.9.0;\n\ninterface IXERC20Lockbox {\n    /**\n     * @notice Emitted when tokens are deposited into the lockbox\n     *\n     * @param _sender The address of the user who deposited\n     * @param _amount The amount of tokens deposited\n     */\n    event Deposit(address _sender, uint256 _amount);\n\n    /**\n     * @notice Emitted when tokens are withdrawn from the lockbox\n     *\n     * @param _sender The address of the user who withdrew\n     * @param _amount The amount of tokens withdrawn\n     */\n    event Withdraw(address _sender, uint256 _amount);\n\n    /**\n     * @notice Reverts when a user tries to deposit native tokens on a non-native lockbox\n     */\n    error IXERC20Lockbox_NotNative();\n\n    /**\n     * @notice Reverts when a user tries to deposit non-native tokens on a native lockbox\n     */\n    error IXERC20Lockbox_Native();\n\n    /**\n     * @notice Reverts when a user tries to withdraw and the call fails\n     */\n    error IXERC20Lockbox_WithdrawFailed();\n\n    /**\n     * @notice Deposit ERC20 tokens into the lockbox\n     *\n     * @param _amount The amount of tokens to deposit\n     */\n    function deposit(uint256 _amount) external;\n\n    /**\n     * @notice Deposit ERC20 tokens into the lockbox, and send the XERC20 to a user\n     *\n     * @param _user The user to send the XERC20 to\n     * @param _amount The amount of tokens to deposit\n     */\n    function depositTo(address _user, uint256 _amount) external;\n\n    /**\n     * @notice Deposit the native asset into the lockbox, and send the XERC20 to a user\n     *\n     * @param _user The user to send the XERC20 to\n     */\n    function depositNativeTo(address _user) external payable;\n\n    /**\n     * @notice Withdraw ERC20 tokens from the lockbox\n     *\n     * @param _amount The amount of tokens to withdraw\n     */\n    function withdraw(uint256 _amount) external;\n\n    /**\n     * @notice Withdraw ERC20 tokens from the lockbox\n     *\n     * @param _user The user to withdraw to\n     * @param _amount The amount of tokens to withdraw\n     */\n    function withdrawTo(address _user, uint256 _amount) external;\n}\n"
      },
      "contracts/bridge/connext/core/IConnext.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {\n    ExecuteArgs,\n    TransferInfo,\n    DestinationTransferStatus\n} from \"../libraries/LibConnextStorage.sol\";\nimport { TokenId } from \"../libraries/TokenId.sol\";\n\ninterface IConnext {\n    // ============ BRIDGE ==============\n\n    function xcall(\n        uint32 _destination,\n        address _to,\n        address _asset,\n        address _delegate,\n        uint256 _amount,\n        uint256 _slippage,\n        bytes calldata _callData\n    ) external payable returns (bytes32);\n\n    function xcall(\n        uint32 _destination,\n        address _to,\n        address _asset,\n        address _delegate,\n        uint256 _amount,\n        uint256 _slippage,\n        bytes calldata _callData,\n        uint256 _relayerFee\n    ) external returns (bytes32);\n\n    function xcallIntoLocal(\n        uint32 _destination,\n        address _to,\n        address _asset,\n        address _delegate,\n        uint256 _amount,\n        uint256 _slippage,\n        bytes calldata _callData\n    ) external payable returns (bytes32);\n\n    function execute(ExecuteArgs calldata _args) external returns (bytes32 transferId);\n\n    function forceUpdateSlippage(TransferInfo calldata _params, uint256 _slippage) external;\n\n    function forceReceiveLocal(TransferInfo calldata _params) external;\n\n    function bumpTransfer(bytes32 _transferId) external payable;\n\n    function routedTransfers(bytes32 _transferId) external view returns (address[] memory);\n\n    function transferStatus(bytes32 _transferId) external view returns (DestinationTransferStatus);\n\n    function remote(uint32 _domain) external view returns (address);\n\n    function domain() external view returns (uint256);\n\n    function nonce() external view returns (uint256);\n\n    function approvedSequencers(address _sequencer) external view returns (bool);\n\n    function xAppConnectionManager() external view returns (address);\n\n    // ============ ROUTERS ==============\n\n    function LIQUIDITY_FEE_NUMERATOR() external view returns (uint256);\n\n    function LIQUIDITY_FEE_DENOMINATOR() external view returns (uint256);\n\n    function getRouterApproval(address _router) external view returns (bool);\n\n    function getRouterRecipient(address _router) external view returns (address);\n\n    function getRouterOwner(address _router) external view returns (address);\n\n    function getProposedRouterOwner(address _router) external view returns (address);\n\n    function getProposedRouterOwnerTimestamp(address _router) external view returns (uint256);\n\n    function maxRoutersPerTransfer() external view returns (uint256);\n\n    function routerBalances(address _router, address _asset) external view returns (uint256);\n\n    function getRouterApprovalForPortal(address _router) external view returns (bool);\n\n    function initializeRouter(address _owner, address _recipient) external;\n\n    function setRouterRecipient(address _router, address _recipient) external;\n\n    function proposeRouterOwner(address _router, address _proposed) external;\n\n    function acceptProposedRouterOwner(address _router) external;\n\n    function addRouterLiquidityFor(\n        uint256 _amount,\n        address _local,\n        address _router\n    ) external payable;\n\n    function addRouterLiquidity(uint256 _amount, address _local) external payable;\n\n    function removeRouterLiquidityFor(\n        TokenId memory _canonical,\n        uint256 _amount,\n        address payable _to,\n        address _router\n    ) external;\n\n    function removeRouterLiquidity(\n        TokenId memory _canonical,\n        uint256 _amount,\n        address payable _to\n    ) external;\n\n    // ============ TOKEN_FACET ==============\n    function adoptedToCanonical(address _adopted) external view returns (TokenId memory);\n\n    function approvedAssets(TokenId calldata _canonical) external view returns (bool);\n    \n    function getTokenId(address _candidate) external view returns (TokenId memory);\n\n    // ============ Functions added to the min interface by Zerog ==============\n\n    // used by the smart contract to swap tokens\n    function swapExact(\n        bytes32 canonicalId,\n        uint256 amountIn,\n        address assetIn,\n        address assetOut,\n        uint256 minAmountOut,\n        uint256 deadline\n    ) external payable returns (uint256);\n\n    // Used by the UI to calculate slippage\n    function calculateSwap(\n        bytes32 canonicalId,\n        uint8 tokenIndexFrom,\n        uint8 tokenIndexTo,\n        uint256 dx\n    ) external view returns (uint256);\n}\n"
      },
      "node_modules/@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"
      },
      "contracts/interfaces/ILRTDepositPool.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.21;\n\ninterface ILRTDepositPool {\n    //errors\n    error TokenTransferFailed();\n    error InvalidAmountToDeposit();\n    error NotEnoughAssetToTransfer();\n    error MaximumDepositLimitReached();\n    error MaximumNodeDelegatorLimitReached();\n    error InvalidMaximumNodeDelegatorLimit();\n    error MinimumAmountToReceiveNotMet();\n    error NodeDelegatorNotFound();\n    error NodeDelegatorHasAssetBalance(address assetAddress, uint256 assetBalance);\n    error NodeDelegatorHasETH();\n\n    //events\n    event MaxNodeDelegatorLimitUpdated(uint256 maxNodeDelegatorLimit);\n    event NodeDelegatorAddedInQueue(address[] nodeDelegatorContracts);\n    event NodeDelegatorRemovedFromQueue(address nodeDelegatorContracts);\n    event AssetDeposit(\n        address indexed depositor,\n        address indexed asset,\n        uint256 depositAmount,\n        uint256 zgEthMintAmount,\n        string referralId\n    );\n    event ETHDeposit(address indexed depositor, uint256 depositAmount, uint256 zgEthMintAmount, string referralId);\n    event MinAmountToDepositUpdated(uint256 minAmountToDeposit);\n    event AssetSwapped(\n        address indexed fromAsset, address indexed toAsset, uint256 fromAssetAmount, uint256 toAssetAmount\n    );\n    event ETHSwappedForLST(uint256 ethAmount, address indexed toAsset, uint256 returnAmount);\n\n    function depositAsset(\n        address asset,\n        uint256 depositAmount,\n        uint256 minZgETHAmount,\n        string calldata referralId\n    )\n        external;\n\n    function depositETH(uint256 minZgETHAmount, string calldata referralId) external payable;\n\n    function getTotalAssetDeposits(address asset) external view returns (uint256);\n\n    function getAssetCurrentLimit(address asset) external view returns (uint256);\n\n    function getMintAmount(address asset, uint256 depositAmount) external view returns (uint256);\n\n    function addNodeDelegatorContractToQueue(address[] calldata nodeDelegatorContract) external;\n\n    function transferAssetToNodeDelegator(uint256 ndcIndex, address asset, uint256 amount) external;\n    function transferAssetsToNodeDelegator(uint256 ndcIndex, address[] calldata assets) external;\n\n    function updateMaxNodeDelegatorLimit(uint256 maxNodeDelegatorLimit) external;\n\n    function getNodeDelegatorQueue() external view returns (address[] memory);\n\n    function getAssetDistributionData(address asset)\n        external\n        view\n        returns (uint256 assetLyingInDepositPool, uint256 assetLyingInNDCs, uint256 assetStakedInEigenLayer);\n\n    function getETHDistributionData()\n        external\n        view\n        returns (uint256 ethLyingInDepositPool, uint256 ethLyingInNDCs, uint256 ethStakedInEigenLayer);\n}\n"
      },
      "contracts/interfaces/ILRTOracle.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.21;\n\ninterface ILRTOracle {\n    // events\n    event AssetPriceOracleUpdate(address indexed asset, address indexed priceOracle);\n\n    // methods\n    function getAssetPrice(address asset) external view returns (uint256);\n    function assetPriceOracle(address asset) external view returns (address);\n    function zgETHPrice() external view returns (uint256);\n}\n"
      },
      "node_modules/@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface LinkTokenInterface {\n  function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n  function approve(address spender, uint256 value) external returns (bool success);\n\n  function balanceOf(address owner) external view returns (uint256 balance);\n\n  function decimals() external view returns (uint8 decimalPlaces);\n\n  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);\n\n  function increaseApproval(address spender, uint256 subtractedValue) external;\n\n  function name() external view returns (string memory tokenName);\n\n  function symbol() external view returns (string memory tokenSymbol);\n\n  function totalSupply() external view returns (uint256 totalTokensIssued);\n\n  function transfer(address to, uint256 value) external returns (bool success);\n\n  function transferAndCall(\n    address to,\n    uint256 value,\n    bytes calldata data\n  ) external returns (bool success);\n\n  function transferFrom(\n    address from,\n    address to,\n    uint256 value\n  ) external returns (bool success);\n}\n"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\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     * Furthermore, `isContract` will also return true if the target contract within\n     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n     * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) 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"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/IERC20Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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 IERC20Upgradeable {\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"
      },
      "contracts/utils/UtilLib.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.21;\n\n/// @title UtilLib - Utility library\n/// @notice Utility functions\nlibrary UtilLib {\n    error ZeroAddressNotAllowed();\n\n    /// @dev zero address check modifier\n    /// @param address_ address to check\n    function checkNonZeroAddress(address address_) internal pure {\n        if (address_ == address(0)) revert ZeroAddressNotAllowed();\n    }\n}\n"
      },
      "contracts/utils/LRTConstants.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.21;\n\nlibrary LRTConstants {\n    //contracts\n    bytes32 public constant LRT_ORACLE = keccak256(\"LRT_ORACLE\");\n    bytes32 public constant LRT_DEPOSIT_POOL = keccak256(\"LRT_DEPOSIT_POOL\");\n    bytes32 public constant EIGEN_STRATEGY_MANAGER = keccak256(\"EIGEN_STRATEGY_MANAGER\");\n\n    //Roles\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n    bytes32 public constant MANAGER = keccak256(\"MANAGER\");\n    bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n    bytes32 public constant BURNER_ROLE = keccak256(\"BURNER_ROLE\");\n\n    // updated library variables\n    bytes32 public constant SFRXETH_TOKEN = keccak256(\"SFRXETH_TOKEN\");\n    // add new vars below\n    bytes32 public constant EIGEN_POD_MANAGER = keccak256(\"EIGEN_POD_MANAGER\");\n\n    // native ETH as ERC20 for ease of implementation\n    address public constant ETH_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n    // Operator Role\n    bytes32 public constant OPERATOR_ROLE = keccak256(\"OPERATOR_ROLE\");\n}\n"
      },
      "contracts/interfaces/ILRTConfig.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.21;\n\ninterface ILRTConfig {\n    // Errors\n    error ValueAlreadyInUse();\n    error AssetAlreadySupported();\n    error AssetNotSupported();\n    error CallerNotLRTConfigAdmin();\n    error CallerNotLRTConfigManager();\n    error CallerNotLRTConfigOperator();\n    error CallerNotLRTConfigAllowedRole(string role);\n    error CannotUpdateStrategyAsItHasFundsNDCFunds(address ndc, uint256 amount);\n\n    // Events\n    event SetToken(bytes32 key, address indexed tokenAddr);\n    event SetContract(bytes32 key, address indexed contractAddr);\n    event AddedNewSupportedAsset(address indexed asset, uint256 depositLimit);\n    event RemovedSupportedAsset(address indexed asset);\n    event AssetDepositLimitUpdate(address indexed asset, uint256 depositLimit);\n    event AssetStrategyUpdate(address indexed asset, address indexed strategy);\n    event SetZgETH(address indexed zgETH);\n\n    // methods\n\n    function zgETH() external view returns (address);\n\n    function assetStrategy(address asset) external view returns (address);\n\n    function isSupportedAsset(address asset) external view returns (bool);\n\n    function getLSTToken(bytes32 tokenId) external view returns (address);\n\n    function getContract(bytes32 contractId) external view returns (address);\n\n    function getSupportedAssetList() external view returns (address[] memory);\n\n    function depositLimitByAsset(address asset) external view returns (uint256);\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted signaling this.\n     *\n     * _Available since v3.1._\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call, an admin role\n     * bearer except when using {AccessControl-_setupRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) external;\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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"
      },
      "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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"
      },
      "lib/openzeppelin-contracts/contracts/utils/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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     * Furthermore, `isContract` will also return true if the target contract within\n     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n     * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) 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"
      },
      "contracts/bridge/connext/libraries/LibConnextStorage.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\n/**\n * @notice Enum representing status of destination transfer\n * @dev Status is only assigned on the destination domain, will always be \"none\" for the\n * origin domains\n * @return uint - Index of value in enum\n */\nenum DestinationTransferStatus {\n    None, // 0\n    Reconciled, // 1\n    Executed, // 2\n    Completed // 3 - executed + reconciled\n}\n\n/**\n * @notice These are the parameters that will remain constant between the\n * two chains. They are supplied on `xcall` and should be asserted on `execute`\n * @property to - The account that receives funds, in the event of a crosschain call,\n * will receive funds if the call fails.\n *\n * @param originDomain - The originating domain (i.e. where `xcall` is called)\n * @param destinationDomain - The final domain (i.e. where `execute` / `reconcile` are called)\\\n * @param canonicalDomain - The canonical domain of the asset you are bridging\n * @param to - The address you are sending funds (and potentially data) to\n * @param delegate - An address who can execute txs on behalf of `to`, in addition to allowing relayers\n * @param receiveLocal - If true, will use the local asset on the destination instead of adopted.\n * @param callData - The data to execute on the receiving chain. If no crosschain call is needed, then leave empty.\n * @param slippage - Slippage user is willing to accept from original amount in expressed in BPS (i.e. if\n * a user takes 1% slippage, this is expressed as 1_000)\n * @param originSender - The msg.sender of the xcall\n * @param bridgedAmt - The amount sent over the bridge (after potential AMM on xcall)\n * @param normalizedIn - The amount sent to `xcall`, normalized to 18 decimals\n * @param nonce - The nonce on the origin domain used to ensure the transferIds are unique\n * @param canonicalId - The unique identifier of the canonical token corresponding to bridge assets\n */\nstruct TransferInfo {\n    uint32 originDomain;\n    uint32 destinationDomain;\n    uint32 canonicalDomain;\n    address to;\n    address delegate;\n    bool receiveLocal;\n    bytes callData;\n    uint256 slippage;\n    address originSender;\n    uint256 bridgedAmt;\n    uint256 normalizedIn;\n    uint256 nonce;\n    bytes32 canonicalId;\n}\n\n/**\n * @notice\n * @param params - The TransferInfo. These are consistent across sending and receiving chains.\n * @param routers - The routers who you are sending the funds on behalf of.\n * @param routerSignatures - Signatures belonging to the routers indicating permission to use funds\n * for the signed transfer ID.\n * @param sequencer - The sequencer who assigned the router path to this transfer.\n * @param sequencerSignature - Signature produced by the sequencer for path assignment accountability\n * for the path that was signed.\n */\nstruct ExecuteArgs {\n    TransferInfo params;\n    address[] routers;\n    bytes[] routerSignatures;\n    address sequencer;\n    bytes sequencerSignature;\n}\n"
      },
      "contracts/bridge/connext/libraries/TokenId.sol": {
        "content": "// SPDX-License-Identifier: MIT OR Apache-2.0\npragma solidity ^0.8.0;\n\n// ============= Structs =============\n\n// Tokens are identified by a TokenId:\n// domain - 4 byte chain ID of the chain from which the token originates\n// id - 32 byte identifier of the token address on the origin chain, in that chain's address format\nstruct TokenId {\n    uint32 domain;\n    bytes32 id;\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "ds-test/=lib/forge-std/lib/ds-test/src/",
        "forge-std/=lib/forge-std/src/",
        "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
        "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
        "@chainlink/contracts/=node_modules/@chainlink/contracts/",
        "@chainlink/contracts-ccip/=node_modules/@chainlink/contracts-ccip/",
        "@eth-optimism/=node_modules/@eth-optimism/",
        "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
        "hardhat/=node_modules/hardhat/",
        "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
        "openzeppelin-contracts/=lib/openzeppelin-contracts/",
        "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
        "solidity-code-metrics/=node_modules/solidity-code-metrics/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 10000
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "shanghai",
      "viaIR": false,
      "libraries": {}
    }
  }}