creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/optimism/L1ERC20TokenBridge.sol": {
        "content": "// SPDX-FileCopyrightText: 2022 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.10;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport {IL1ERC20Bridge} from \"./interfaces/IL1ERC20Bridge.sol\";\nimport {IL2ERC20Bridge} from \"./interfaces/IL2ERC20Bridge.sol\";\n\nimport {BridgingManager} from \"../BridgingManager.sol\";\nimport {BridgeableTokens} from \"../BridgeableTokens.sol\";\nimport {CrossDomainEnabled} from \"./CrossDomainEnabled.sol\";\n\n/// @author psirex\n/// @notice The L1 ERC20 token bridge locks bridged tokens on the L1 side, sends deposit messages\n///     on the L2 side, and finalizes token withdrawals from L2. Additionally, adds the methods for\n///     bridging management: enabling and disabling withdrawals/deposits\ncontract L1ERC20TokenBridge is\n    IL1ERC20Bridge,\n    BridgingManager,\n    BridgeableTokens,\n    CrossDomainEnabled\n{\n    using SafeERC20 for IERC20;\n\n    /// @inheritdoc IL1ERC20Bridge\n    address public immutable l2TokenBridge;\n\n    /// @param messenger_ L1 messenger address being used for cross-chain communications\n    /// @param l2TokenBridge_ Address of the corresponding L2 bridge\n    /// @param l1Token_ Address of the bridged token in the L1 chain\n    /// @param l2Token_ Address of the token minted on the L2 chain when token bridged\n    constructor(\n        address messenger_,\n        address l2TokenBridge_,\n        address l1Token_,\n        address l2Token_\n    ) CrossDomainEnabled(messenger_) BridgeableTokens(l1Token_, l2Token_) {\n        l2TokenBridge = l2TokenBridge_;\n    }\n\n    /// @inheritdoc IL1ERC20Bridge\n    function depositERC20(\n        address l1Token_,\n        address l2Token_,\n        uint256 amount_,\n        uint32 l2Gas_,\n        bytes calldata data_\n    )\n        external\n        whenDepositsEnabled\n        onlySupportedL1Token(l1Token_)\n        onlySupportedL2Token(l2Token_)\n    {\n        if (Address.isContract(msg.sender)) {\n            revert ErrorSenderNotEOA();\n        }\n        _initiateERC20Deposit(msg.sender, msg.sender, amount_, l2Gas_, data_);\n    }\n\n    /// @inheritdoc IL1ERC20Bridge\n    function depositERC20To(\n        address l1Token_,\n        address l2Token_,\n        address to_,\n        uint256 amount_,\n        uint32 l2Gas_,\n        bytes calldata data_\n    )\n        external\n        whenDepositsEnabled\n        onlyNonZeroAccount(to_)\n        onlySupportedL1Token(l1Token_)\n        onlySupportedL2Token(l2Token_)\n    {\n        _initiateERC20Deposit(msg.sender, to_, amount_, l2Gas_, data_);\n    }\n\n    /// @inheritdoc IL1ERC20Bridge\n    function finalizeERC20Withdrawal(\n        address l1Token_,\n        address l2Token_,\n        address from_,\n        address to_,\n        uint256 amount_,\n        bytes calldata data_\n    )\n        external\n        whenWithdrawalsEnabled\n        onlySupportedL1Token(l1Token_)\n        onlySupportedL2Token(l2Token_)\n        onlyFromCrossDomainAccount(l2TokenBridge)\n    {\n        IERC20(l1Token_).safeTransfer(to_, amount_);\n\n        emit ERC20WithdrawalFinalized(\n            l1Token_,\n            l2Token_,\n            from_,\n            to_,\n            amount_,\n            data_\n        );\n    }\n\n    /// @dev Performs the logic for deposits by informing the L2 token bridge contract\n    ///     of the deposit and calling safeTransferFrom to lock the L1 funds.\n    /// @param from_ Account to pull the deposit from on L1\n    /// @param to_ Account to give the deposit to on L2\n    /// @param amount_ Amount of the ERC20 to deposit.\n    /// @param l2Gas_ Gas limit required to complete the deposit on L2.\n    /// @param data_ Optional data to forward to L2. This data is provided\n    ///        solely as a convenience for external contracts. Aside from enforcing a maximum\n    ///        length, these contracts provide no guarantees about its content.\n    function _initiateERC20Deposit(\n        address from_,\n        address to_,\n        uint256 amount_,\n        uint32 l2Gas_,\n        bytes calldata data_\n    ) internal {\n        IERC20(l1Token).safeTransferFrom(from_, address(this), amount_);\n\n        bytes memory message = abi.encodeWithSelector(\n            IL2ERC20Bridge.finalizeDeposit.selector,\n            l1Token,\n            l2Token,\n            from_,\n            to_,\n            amount_,\n            data_\n        );\n\n        sendCrossDomainMessage(l2TokenBridge, l2Gas_, message);\n\n        emit ERC20DepositInitiated(\n            l1Token,\n            l2Token,\n            from_,\n            to_,\n            amount_,\n            data_\n        );\n    }\n\n    error ErrorSenderNotEOA();\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}\n"
      },
      "@openzeppelin/contracts/utils/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"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(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) 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        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(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        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(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        require(isContract(target), \"Address: delegate call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason 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            // 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\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}\n"
      },
      "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    using Address for address;\n\n    function safeTransfer(\n        IERC20 token,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    function safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value\n    ) 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(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        // safeApprove should only be called when setting an initial allowance,\n        // or when resetting it to zero. To increase and decrease it, use\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n        require(\n            (value == 0) || (token.allowance(address(this), spender) == 0),\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\n        );\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n    }\n\n    function safeIncreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n    }\n\n    function safeDecreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        unchecked {\n            uint256 oldAllowance = token.allowance(address(this), spender);\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n            uint256 newAllowance = oldAllowance - value;\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n        // the target address contains contract code and also asserts for success in the low-level call.\n\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n        if (returndata.length > 0) {\n            // Return data is optional\n            require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n        }\n    }\n}\n"
      },
      "contracts/optimism/interfaces/IL1ERC20Bridge.sol": {
        "content": "// SPDX-FileCopyrightText: 2022 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.10;\n\n/// @notice The L1 Standard bridge locks bridged tokens on the L1 side, sends deposit messages\n///     on the L2 side, and finalizes token withdrawals from L2.\ninterface IL1ERC20Bridge {\n    event ERC20DepositInitiated(\n        address indexed _l1Token,\n        address indexed _l2Token,\n        address indexed _from,\n        address _to,\n        uint256 _amount,\n        bytes _data\n    );\n\n    event ERC20WithdrawalFinalized(\n        address indexed _l1Token,\n        address indexed _l2Token,\n        address indexed _from,\n        address _to,\n        uint256 _amount,\n        bytes _data\n    );\n\n    /// @notice get the address of the corresponding L2 bridge contract.\n    /// @return Address of the corresponding L2 bridge contract.\n    function l2TokenBridge() external returns (address);\n\n    /// @notice deposit an amount of the ERC20 to the caller's balance on L2.\n    /// @param l1Token_ Address of the L1 ERC20 we are depositing\n    /// @param l2Token_ Address of the L1 respective L2 ERC20\n    /// @param amount_ Amount of the ERC20 to deposit\n    /// @param l2Gas_ Gas limit required to complete the deposit on L2.\n    /// @param data_ Optional data to forward to L2. This data is provided\n    ///        solely as a convenience for external contracts. Aside from enforcing a maximum\n    ///        length, these contracts provide no guarantees about its content.\n    function depositERC20(\n        address l1Token_,\n        address l2Token_,\n        uint256 amount_,\n        uint32 l2Gas_,\n        bytes calldata data_\n    ) external;\n\n    /// @notice deposit an amount of ERC20 to a recipient's balance on L2.\n    /// @param l1Token_ Address of the L1 ERC20 we are depositing\n    /// @param l2Token_ Address of the L1 respective L2 ERC20\n    /// @param to_ L2 address to credit the withdrawal to.\n    /// @param amount_ Amount of the ERC20 to deposit.\n    /// @param l2Gas_ Gas limit required to complete the deposit on L2.\n    /// @param data_ Optional data to forward to L2. This data is provided\n    ///        solely as a convenience for external contracts. Aside from enforcing a maximum\n    ///        length, these contracts provide no guarantees about its content.\n    function depositERC20To(\n        address l1Token_,\n        address l2Token_,\n        address to_,\n        uint256 amount_,\n        uint32 l2Gas_,\n        bytes calldata data_\n    ) external;\n\n    /// @notice Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the\n    /// L1 ERC20 token.\n    /// @dev This call will fail if the initialized withdrawal from L2 has not been finalized.\n    /// @param l1Token_ Address of L1 token to finalizeWithdrawal for.\n    /// @param l2Token_ Address of L2 token where withdrawal was initiated.\n    /// @param from_ L2 address initiating the transfer.\n    /// @param to_ L1 address to credit the withdrawal to.\n    /// @param amount_ Amount of the ERC20 to deposit.\n    /// @param data_ Data provided by the sender on L2. This data is provided\n    ///   solely as a convenience for external contracts. Aside from enforcing a maximum\n    ///   length, these contracts provide no guarantees about its content.\n    function finalizeERC20Withdrawal(\n        address l1Token_,\n        address l2Token_,\n        address from_,\n        address to_,\n        uint256 amount_,\n        bytes calldata data_\n    ) external;\n}\n"
      },
      "contracts/optimism/interfaces/IL2ERC20Bridge.sol": {
        "content": "// SPDX-FileCopyrightText: 2022 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.10;\n\n/// @notice The L2 token bridge works with the L1 token bridge to enable ERC20 token bridging\n///     between L1 and L2. It acts as a minter for new tokens when it hears about\n///     deposits into the L1 token bridge. It also acts as a burner of the tokens\n///     intended for withdrawal, informing the L1 bridge to release L1 funds.\ninterface IL2ERC20Bridge {\n    event WithdrawalInitiated(\n        address indexed _l1Token,\n        address indexed _l2Token,\n        address indexed _from,\n        address _to,\n        uint256 _amount,\n        bytes _data\n    );\n\n    event DepositFinalized(\n        address indexed _l1Token,\n        address indexed _l2Token,\n        address indexed _from,\n        address _to,\n        uint256 _amount,\n        bytes _data\n    );\n\n    event DepositFailed(\n        address indexed _l1Token,\n        address indexed _l2Token,\n        address indexed _from,\n        address _to,\n        uint256 _amount,\n        bytes _data\n    );\n\n    /// @notice Returns the address of the corresponding L1 bridge contract\n    function l1TokenBridge() external returns (address);\n\n    /// @notice Initiates a withdraw of some tokens to the caller's account on L1\n    /// @param l2Token_ Address of L2 token where withdrawal was initiated.\n    /// @param amount_ Amount of the token to withdraw.\n    /// @param l1Gas_ Unused, but included for potential forward compatibility considerations.\n    /// @param data_ Optional data to forward to L1. This data is provided\n    ///     solely as a convenience for external contracts. Aside from enforcing a maximum\n    ///     length, these contracts provide no guarantees about its content.\n    function withdraw(\n        address l2Token_,\n        uint256 amount_,\n        uint32 l1Gas_,\n        bytes calldata data_\n    ) external;\n\n    /// @notice Initiates a withdraw of some token to a recipient's account on L1.\n    /// @param l2Token_ Address of L2 token where withdrawal is initiated.\n    /// @param to_ L1 adress to credit the withdrawal to.\n    /// @param amount_ Amount of the token to withdraw.\n    /// @param l1Gas_ Unused, but included for potential forward compatibility considerations.\n    /// @param data_ Optional data to forward to L1. This data is provided\n    ///     solely as a convenience for external contracts. Aside from enforcing a maximum\n    ///     length, these contracts provide no guarantees about its content.\n    function withdrawTo(\n        address l2Token_,\n        address to_,\n        uint256 amount_,\n        uint32 l1Gas_,\n        bytes calldata data_\n    ) external;\n\n    /// @notice Completes a deposit from L1 to L2, and credits funds to the recipient's balance of\n    ///     this L2 token. This call will fail if it did not originate from a corresponding deposit\n    ///     in L1StandardTokenBridge.\n    /// @param l1Token_ Address for the l1 token this is called with\n    /// @param l2Token_ Address for the l2 token this is called with\n    /// @param from_ Account to pull the deposit from on L2.\n    /// @param to_ Address to receive the withdrawal at\n    /// @param amount_ Amount of the token to withdraw\n    /// @param data_ Data provider by the sender on L1. This data is provided\n    ///     solely as a convenience for external contracts. Aside from enforcing a maximum\n    ///     length, these contracts provide no guarantees about its content.\n    function finalizeDeposit(\n        address l1Token_,\n        address l2Token_,\n        address from_,\n        address to_,\n        uint256 amount_,\n        bytes calldata data_\n    ) external;\n}\n"
      },
      "contracts/BridgingManager.sol": {
        "content": "// SPDX-FileCopyrightText: 2022 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.10;\n\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\n\n/// @author psirex\n/// @notice Contains administrative methods to retrieve and control the state of the bridging\ncontract BridgingManager is AccessControl {\n    /// @dev Stores the state of the bridging\n    /// @param isInitialized Shows whether the contract is initialized or not\n    /// @param isDepositsEnabled Stores the state of the deposits\n    /// @param isWithdrawalsEnabled Stores the state of the withdrawals\n    struct State {\n        bool isInitialized;\n        bool isDepositsEnabled;\n        bool isWithdrawalsEnabled;\n    }\n\n    bytes32 public constant DEPOSITS_ENABLER_ROLE =\n        keccak256(\"BridgingManager.DEPOSITS_ENABLER_ROLE\");\n    bytes32 public constant DEPOSITS_DISABLER_ROLE =\n        keccak256(\"BridgingManager.DEPOSITS_DISABLER_ROLE\");\n    bytes32 public constant WITHDRAWALS_ENABLER_ROLE =\n        keccak256(\"BridgingManager.WITHDRAWALS_ENABLER_ROLE\");\n    bytes32 public constant WITHDRAWALS_DISABLER_ROLE =\n        keccak256(\"BridgingManager.WITHDRAWALS_DISABLER_ROLE\");\n\n    /// @dev The location of the slot with State\n    bytes32 private constant STATE_SLOT =\n        keccak256(\"BridgingManager.bridgingState\");\n\n    /// @notice Initializes the contract to grant DEFAULT_ADMIN_ROLE to the admin_ address\n    /// @dev This method might be called only once\n    /// @param admin_ Address of the account to grant the DEFAULT_ADMIN_ROLE\n    function initialize(address admin_) external {\n        State storage s = _loadState();\n        if (s.isInitialized) {\n            revert ErrorAlreadyInitialized();\n        }\n        _setupRole(DEFAULT_ADMIN_ROLE, admin_);\n        s.isInitialized = true;\n        emit Initialized(admin_);\n    }\n\n    /// @notice Returns whether the contract is initialized or not\n    function isInitialized() public view returns (bool) {\n        return _loadState().isInitialized;\n    }\n\n    /// @notice Returns whether the deposits are enabled or not\n    function isDepositsEnabled() public view returns (bool) {\n        return _loadState().isDepositsEnabled;\n    }\n\n    /// @notice Returns whether the withdrawals are enabled or not\n    function isWithdrawalsEnabled() public view returns (bool) {\n        return _loadState().isWithdrawalsEnabled;\n    }\n\n    /// @notice Enables the deposits if they are disabled\n    function enableDeposits() external onlyRole(DEPOSITS_ENABLER_ROLE) {\n        if (isDepositsEnabled()) {\n            revert ErrorDepositsEnabled();\n        }\n        _loadState().isDepositsEnabled = true;\n        emit DepositsEnabled(msg.sender);\n    }\n\n    /// @notice Disables the deposits if they aren't disabled yet\n    function disableDeposits()\n        external\n        whenDepositsEnabled\n        onlyRole(DEPOSITS_DISABLER_ROLE)\n    {\n        _loadState().isDepositsEnabled = false;\n        emit DepositsDisabled(msg.sender);\n    }\n\n    /// @notice Enables the withdrawals if they are disabled\n    function enableWithdrawals() external onlyRole(WITHDRAWALS_ENABLER_ROLE) {\n        if (isWithdrawalsEnabled()) {\n            revert ErrorWithdrawalsEnabled();\n        }\n        _loadState().isWithdrawalsEnabled = true;\n        emit WithdrawalsEnabled(msg.sender);\n    }\n\n    /// @notice Disables the withdrawals if they aren't disabled yet\n    function disableWithdrawals()\n        external\n        whenWithdrawalsEnabled\n        onlyRole(WITHDRAWALS_DISABLER_ROLE)\n    {\n        _loadState().isWithdrawalsEnabled = false;\n        emit WithdrawalsDisabled(msg.sender);\n    }\n\n    /// @dev Returns the reference to the slot with State struct\n    function _loadState() private pure returns (State storage r) {\n        bytes32 slot = STATE_SLOT;\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /// @dev Validates that deposits are enabled\n    modifier whenDepositsEnabled() {\n        if (!isDepositsEnabled()) {\n            revert ErrorDepositsDisabled();\n        }\n        _;\n    }\n\n    /// @dev Validates that withdrawals are enabled\n    modifier whenWithdrawalsEnabled() {\n        if (!isWithdrawalsEnabled()) {\n            revert ErrorWithdrawalsDisabled();\n        }\n        _;\n    }\n\n    event DepositsEnabled(address indexed enabler);\n    event DepositsDisabled(address indexed disabler);\n    event WithdrawalsEnabled(address indexed enabler);\n    event WithdrawalsDisabled(address indexed disabler);\n    event Initialized(address indexed admin);\n\n    error ErrorDepositsEnabled();\n    error ErrorDepositsDisabled();\n    error ErrorWithdrawalsEnabled();\n    error ErrorWithdrawalsDisabled();\n    error ErrorAlreadyInitialized();\n}\n"
      },
      "contracts/BridgeableTokens.sol": {
        "content": "// SPDX-FileCopyrightText: 2022 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.10;\n\n/// @author psirex\n/// @notice Contains the logic for validation of tokens used in the bridging process\ncontract BridgeableTokens {\n    /// @notice Address of the bridged token in the L1 chain\n    address public immutable l1Token;\n\n    /// @notice Address of the token minted on the L2 chain when token bridged\n    address public immutable l2Token;\n\n    /// @param l1Token_ Address of the bridged token in the L1 chain\n    /// @param l2Token_ Address of the token minted on the L2 chain when token bridged\n    constructor(address l1Token_, address l2Token_) {\n        l1Token = l1Token_;\n        l2Token = l2Token_;\n    }\n\n    /// @dev Validates that passed l1Token_ is supported by the bridge\n    modifier onlySupportedL1Token(address l1Token_) {\n        if (l1Token_ != l1Token) {\n            revert ErrorUnsupportedL1Token();\n        }\n        _;\n    }\n\n    /// @dev Validates that passed l2Token_ is supported by the bridge\n    modifier onlySupportedL2Token(address l2Token_) {\n        if (l2Token_ != l2Token) {\n            revert ErrorUnsupportedL2Token();\n        }\n        _;\n    }\n\n    /// @dev validates that account_ is not zero address\n    modifier onlyNonZeroAccount(address account_) {\n        if (account_ == address(0)) {\n            revert ErrorAccountIsZeroAddress();\n        }\n        _;\n    }\n\n    error ErrorUnsupportedL1Token();\n    error ErrorUnsupportedL2Token();\n    error ErrorAccountIsZeroAddress();\n}\n"
      },
      "contracts/optimism/CrossDomainEnabled.sol": {
        "content": "// SPDX-FileCopyrightText: 2022 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.10;\n\nimport {ICrossDomainMessenger} from \"./interfaces/ICrossDomainMessenger.sol\";\n\n/// @dev Helper contract for contracts performing cross-domain communications\ncontract CrossDomainEnabled {\n    /// @notice Messenger contract used to send and receive messages from the other domain\n    ICrossDomainMessenger public immutable messenger;\n\n    /// @param messenger_ Address of the CrossDomainMessenger on the current layer\n    constructor(address messenger_) {\n        messenger = ICrossDomainMessenger(messenger_);\n    }\n\n    /// @dev Sends a message to an account on another domain\n    /// @param crossDomainTarget_ Intended recipient on the destination domain\n    /// @param message_ Data to send to the target (usually calldata to a function with\n    ///     `onlyFromCrossDomainAccount()`)\n    /// @param gasLimit_ gasLimit for the receipt of the message on the target domain.\n    function sendCrossDomainMessage(\n        address crossDomainTarget_,\n        uint32 gasLimit_,\n        bytes memory message_\n    ) internal {\n        messenger.sendMessage(crossDomainTarget_, message_, gasLimit_);\n    }\n\n    /// @dev Enforces that the modified function is only callable by a specific cross-domain account\n    /// @param sourceDomainAccount_ The only account on the originating domain which is\n    ///     authenticated to call this function\n    modifier onlyFromCrossDomainAccount(address sourceDomainAccount_) {\n        if (msg.sender != address(messenger)) {\n            revert ErrorUnauthorizedMessenger();\n        }\n        if (messenger.xDomainMessageSender() != sourceDomainAccount_) {\n            revert ErrorWrongCrossDomainSender();\n        }\n        _;\n    }\n\n    error ErrorUnauthorizedMessenger();\n    error ErrorWrongCrossDomainSender();\n}\n"
      },
      "@openzeppelin/contracts/access/AccessControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n    struct RoleData {\n        mapping(address => bool) members;\n        bytes32 adminRole;\n    }\n\n    mapping(bytes32 => RoleData) private _roles;\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with a standardized message including the required role.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     *\n     * _Available since v4.1._\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role);\n        _;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n        return _roles[role].members[account];\n    }\n\n    /**\n     * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n     * Overriding this function changes the behavior of the {onlyRole} modifier.\n     *\n     * Format of the revert message is described in {_checkRole}.\n     *\n     * _Available since v4.6._\n     */\n    function _checkRole(bytes32 role) internal view virtual {\n        _checkRole(role, _msgSender());\n    }\n\n    /**\n     * @dev Revert with a standard message if `account` is missing `role`.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     */\n    function _checkRole(bytes32 role, address account) internal view virtual {\n        if (!hasRole(role, account)) {\n            revert(\n                string(\n                    abi.encodePacked(\n                        \"AccessControl: account \",\n                        Strings.toHexString(uint160(account), 20),\n                        \" is missing role \",\n                        Strings.toHexString(uint256(role), 32)\n                    )\n                )\n            );\n        }\n    }\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 {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n        return _roles[role].adminRole;\n    }\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) public virtual override onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\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) public virtual override onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\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 revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) public virtual override {\n        require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event. Note that unlike {grantRole}, this function doesn't perform any\n     * checks on the calling account.\n     *\n     * [WARNING]\n     * ====\n     * This function should only be called from the constructor when setting\n     * up the initial roles for the system.\n     *\n     * Using this function in any other way is effectively circumventing the admin\n     * system imposed by {AccessControl}.\n     * ====\n     *\n     * NOTE: This function is deprecated in favor of {_grantRole}.\n     */\n    function _setupRole(bytes32 role, address account) internal virtual {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        _roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * Internal function without access restriction.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual {\n        if (!hasRole(role, account)) {\n            _roles[role].members[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n        }\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * Internal function without access restriction.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual {\n        if (hasRole(role, account)) {\n            _roles[role].members[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n        }\n    }\n}\n"
      },
      "@openzeppelin/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"
      },
      "@openzeppelin/contracts/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/Strings.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        // Inspired by OraclizeAPI's implementation - MIT licence\n        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n        if (value == 0) {\n            return \"0\";\n        }\n        uint256 temp = value;\n        uint256 digits;\n        while (temp != 0) {\n            digits++;\n            temp /= 10;\n        }\n        bytes memory buffer = new bytes(digits);\n        while (value != 0) {\n            digits -= 1;\n            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n            value /= 10;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        if (value == 0) {\n            return \"0x00\";\n        }\n        uint256 temp = value;\n        uint256 length = 0;\n        while (temp != 0) {\n            length++;\n            temp >>= 8;\n        }\n        return toHexString(value, length);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = _HEX_SYMBOLS[value & 0xf];\n            value >>= 4;\n        }\n        require(value == 0, \"Strings: hex length insufficient\");\n        return string(buffer);\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/introspection/ERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/introspection/IERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
      },
      "contracts/optimism/interfaces/ICrossDomainMessenger.sol": {
        "content": "// SPDX-FileCopyrightText: 2022 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.10;\n\ninterface ICrossDomainMessenger {\n    function xDomainMessageSender() external view returns (address);\n\n    /// Sends a cross domain message to the target messenger.\n    /// @param _target Target contract address.\n    /// @param _message Message to send to the target.\n    /// @param _gasLimit Gas limit for the provided message.\n    function sendMessage(\n        address _target,\n        bytes calldata _message,\n        uint32 _gasLimit\n    ) external;\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 100000
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}