creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "src/v0.8/ccip/pools/BurnMintTokenPool.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.19;\n\nimport {ITypeAndVersion} from \"../../shared/interfaces/ITypeAndVersion.sol\";\nimport {IBurnMintERC20} from \"../../shared/token/ERC20/IBurnMintERC20.sol\";\n\nimport {TokenPool} from \"./TokenPool.sol\";\nimport {BurnMintTokenPoolAbstract} from \"./BurnMintTokenPoolAbstract.sol\";\n\n/// @notice This pool mints and burns a 3rd-party token.\n/// @dev Pool whitelisting mode is set in the constructor and cannot be modified later.\n/// It either accepts any address as originalSender, or only accepts whitelisted originalSender.\n/// The only way to change whitelisting mode is to deploy a new pool.\n/// If that is expected, please make sure the token's burner/minter roles are adjustable.\ncontract BurnMintTokenPool is BurnMintTokenPoolAbstract, ITypeAndVersion {\n  string public constant override typeAndVersion = \"BurnMintTokenPool 1.4.0\";\n\n  constructor(\n    IBurnMintERC20 token,\n    address[] memory allowlist,\n    address armProxy,\n    address router\n  ) TokenPool(token, allowlist, armProxy, router) {}\n\n  /// @inheritdoc BurnMintTokenPoolAbstract\n  function _burn(uint256 amount) internal virtual override {\n    IBurnMintERC20(address(i_token)).burn(amount);\n  }\n}\n"
      },
      "src/v0.8/shared/interfaces/ITypeAndVersion.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface ITypeAndVersion {\n  function typeAndVersion() external pure returns (string memory);\n}\n"
      },
      "src/v0.8/shared/token/ERC20/IBurnMintERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol\";\n\ninterface IBurnMintERC20 is IERC20 {\n  /// @notice Mints new tokens for a given address.\n  /// @param account The address to mint the new tokens to.\n  /// @param amount The number of tokens to be minted.\n  /// @dev this function increases the total supply.\n  function mint(address account, uint256 amount) external;\n\n  /// @notice Burns tokens from the sender.\n  /// @param amount The number of tokens to be burned.\n  /// @dev this function decreases the total supply.\n  function burn(uint256 amount) external;\n\n  /// @notice Burns tokens from a given address..\n  /// @param account The address to burn tokens from.\n  /// @param amount The number of tokens to be burned.\n  /// @dev this function decreases the total supply.\n  function burn(address account, uint256 amount) external;\n\n  /// @notice Burns tokens from a given address..\n  /// @param account The address to burn tokens from.\n  /// @param amount The number of tokens to be burned.\n  /// @dev this function decreases the total supply.\n  function burnFrom(address account, uint256 amount) external;\n}\n"
      },
      "src/v0.8/ccip/pools/TokenPool.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.19;\n\nimport {IPool} from \"../interfaces/pools/IPool.sol\";\nimport {IARM} from \"../interfaces/IARM.sol\";\nimport {IRouter} from \"../interfaces/IRouter.sol\";\n\nimport {OwnerIsCreator} from \"../../shared/access/OwnerIsCreator.sol\";\nimport {RateLimiter} from \"../libraries/RateLimiter.sol\";\n\nimport {IERC20} from \"../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol\";\nimport {IERC165} from \"../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol\";\nimport {EnumerableSet} from \"../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol\";\n\n/// @notice Base abstract class with common functions for all token pools.\n/// A token pool serves as isolated place for holding tokens and token specific logic\n/// that may execute as tokens move across the bridge.\nabstract contract TokenPool is IPool, OwnerIsCreator, IERC165 {\n  using EnumerableSet for EnumerableSet.AddressSet;\n  using EnumerableSet for EnumerableSet.UintSet;\n  using RateLimiter for RateLimiter.TokenBucket;\n\n  error CallerIsNotARampOnRouter(address caller);\n  error ZeroAddressNotAllowed();\n  error SenderNotAllowed(address sender);\n  error AllowListNotEnabled();\n  error NonExistentChain(uint64 remoteChainSelector);\n  error ChainNotAllowed(uint64 remoteChainSelector);\n  error BadARMSignal();\n  error ChainAlreadyExists(uint64 chainSelector);\n\n  event Locked(address indexed sender, uint256 amount);\n  event Burned(address indexed sender, uint256 amount);\n  event Released(address indexed sender, address indexed recipient, uint256 amount);\n  event Minted(address indexed sender, address indexed recipient, uint256 amount);\n  event ChainAdded(\n    uint64 remoteChainSelector,\n    RateLimiter.Config outboundRateLimiterConfig,\n    RateLimiter.Config inboundRateLimiterConfig\n  );\n  event ChainConfigured(\n    uint64 remoteChainSelector,\n    RateLimiter.Config outboundRateLimiterConfig,\n    RateLimiter.Config inboundRateLimiterConfig\n  );\n  event ChainRemoved(uint64 remoteChainSelector);\n  event AllowListAdd(address sender);\n  event AllowListRemove(address sender);\n  event RouterUpdated(address oldRouter, address newRouter);\n\n  struct ChainUpdate {\n    uint64 remoteChainSelector; // ──╮ Remote chain selector\n    bool allowed; // ────────────────╯ Whether the chain is allowed\n    RateLimiter.Config outboundRateLimiterConfig; // Outbound rate limited config, meaning the rate limits for all of the onRamps for the given chain\n    RateLimiter.Config inboundRateLimiterConfig; // Inbound rate limited config, meaning the rate limits for all of the offRamps for the given chain\n  }\n\n  /// @dev The bridgeable token that is managed by this pool.\n  IERC20 internal immutable i_token;\n  /// @dev The address of the arm proxy\n  address internal immutable i_armProxy;\n  /// @dev The immutable flag that indicates if the pool is access-controlled.\n  bool internal immutable i_allowlistEnabled;\n  /// @dev A set of addresses allowed to trigger lockOrBurn as original senders.\n  /// Only takes effect if i_allowlistEnabled is true.\n  /// This can be used to ensure only token-issuer specified addresses can\n  /// move tokens.\n  EnumerableSet.AddressSet internal s_allowList;\n  /// @dev The address of the router\n  IRouter internal s_router;\n  /// @dev A set of allowed chain selectors. We want the allowlist to be enumerable to\n  /// be able to quickly determine (without parsing logs) who can access the pool.\n  /// @dev The chain selectors are in uin256 format because of the EnumerableSet implementation.\n  EnumerableSet.UintSet internal s_remoteChainSelectors;\n  /// @dev Outbound rate limits. Corresponds to the inbound rate limit for the pool\n  /// on the remote chain.\n  mapping(uint64 remoteChainSelector => RateLimiter.TokenBucket) internal s_outboundRateLimits;\n  /// @dev Inbound rate limits. This allows per destination chain\n  /// token issuer specified rate limiting (e.g. issuers may trust chains to varying\n  /// degrees and prefer different limits)\n  mapping(uint64 remoteChainSelector => RateLimiter.TokenBucket) internal s_inboundRateLimits;\n\n  constructor(IERC20 token, address[] memory allowlist, address armProxy, address router) {\n    if (address(token) == address(0) || router == address(0)) revert ZeroAddressNotAllowed();\n    i_token = token;\n    i_armProxy = armProxy;\n    s_router = IRouter(router);\n\n    // Pool can be set as permissioned or permissionless at deployment time only to save hot-path gas.\n    i_allowlistEnabled = allowlist.length > 0;\n    if (i_allowlistEnabled) {\n      _applyAllowListUpdates(new address[](0), allowlist);\n    }\n  }\n\n  /// @notice Get ARM proxy address\n  /// @return armProxy Address of arm proxy\n  function getArmProxy() public view returns (address armProxy) {\n    return i_armProxy;\n  }\n\n  /// @inheritdoc IPool\n  function getToken() public view override returns (IERC20 token) {\n    return i_token;\n  }\n\n  /// @notice Gets the pool's Router\n  /// @return router The pool's Router\n  function getRouter() public view returns (address router) {\n    return address(s_router);\n  }\n\n  /// @notice Sets the pool's Router\n  /// @param newRouter The new Router\n  function setRouter(address newRouter) public onlyOwner {\n    if (newRouter == address(0)) revert ZeroAddressNotAllowed();\n    address oldRouter = address(s_router);\n    s_router = IRouter(newRouter);\n\n    emit RouterUpdated(oldRouter, newRouter);\n  }\n\n  /// @inheritdoc IERC165\n  function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) {\n    return interfaceId == type(IPool).interfaceId || interfaceId == type(IERC165).interfaceId;\n  }\n\n  // ================================================================\n  // │                     Chain permissions                        │\n  // ================================================================\n\n  /// @notice Checks whether a chain selector is permissioned on this contract.\n  /// @return true if the given chain selector is a permissioned remote chain.\n  function isSupportedChain(uint64 remoteChainSelector) public view returns (bool) {\n    return s_remoteChainSelectors.contains(remoteChainSelector);\n  }\n\n  /// @notice Get list of allowed chains\n  /// @return list of chains.\n  function getSupportedChains() public view returns (uint64[] memory) {\n    uint256[] memory uint256ChainSelectors = s_remoteChainSelectors.values();\n    uint64[] memory chainSelectors = new uint64[](uint256ChainSelectors.length);\n    for (uint256 i = 0; i < uint256ChainSelectors.length; ++i) {\n      chainSelectors[i] = uint64(uint256ChainSelectors[i]);\n    }\n\n    return chainSelectors;\n  }\n\n  /// @notice Sets the permissions for a list of chains selectors. Actual senders for these chains\n  /// need to be allowed on the Router to interact with this pool.\n  /// @dev Only callable by the owner\n  /// @param chains A list of chains and their new permission status & rate limits. Rate limits\n  /// are only used when the chain is being added through `allowed` being true.\n  function applyChainUpdates(ChainUpdate[] calldata chains) external virtual onlyOwner {\n    for (uint256 i = 0; i < chains.length; ++i) {\n      ChainUpdate memory update = chains[i];\n      RateLimiter._validateTokenBucketConfig(update.outboundRateLimiterConfig, !update.allowed);\n      RateLimiter._validateTokenBucketConfig(update.inboundRateLimiterConfig, !update.allowed);\n\n      if (update.allowed) {\n        // If the chain already exists, revert\n        if (!s_remoteChainSelectors.add(update.remoteChainSelector)) {\n          revert ChainAlreadyExists(update.remoteChainSelector);\n        }\n\n        s_outboundRateLimits[update.remoteChainSelector] = RateLimiter.TokenBucket({\n          rate: update.outboundRateLimiterConfig.rate,\n          capacity: update.outboundRateLimiterConfig.capacity,\n          tokens: update.outboundRateLimiterConfig.capacity,\n          lastUpdated: uint32(block.timestamp),\n          isEnabled: update.outboundRateLimiterConfig.isEnabled\n        });\n\n        s_inboundRateLimits[update.remoteChainSelector] = RateLimiter.TokenBucket({\n          rate: update.inboundRateLimiterConfig.rate,\n          capacity: update.inboundRateLimiterConfig.capacity,\n          tokens: update.inboundRateLimiterConfig.capacity,\n          lastUpdated: uint32(block.timestamp),\n          isEnabled: update.inboundRateLimiterConfig.isEnabled\n        });\n        emit ChainAdded(update.remoteChainSelector, update.outboundRateLimiterConfig, update.inboundRateLimiterConfig);\n      } else {\n        // If the chain doesn't exist, revert\n        if (!s_remoteChainSelectors.remove(update.remoteChainSelector)) {\n          revert NonExistentChain(update.remoteChainSelector);\n        }\n\n        delete s_inboundRateLimits[update.remoteChainSelector];\n        delete s_outboundRateLimits[update.remoteChainSelector];\n        emit ChainRemoved(update.remoteChainSelector);\n      }\n    }\n  }\n\n  // ================================================================\n  // │                        Rate limiting                         │\n  // ================================================================\n\n  /// @notice Consumes outbound rate limiting capacity in this pool\n  function _consumeOutboundRateLimit(uint64 remoteChainSelector, uint256 amount) internal {\n    s_outboundRateLimits[remoteChainSelector]._consume(amount, address(i_token));\n  }\n\n  /// @notice Consumes inbound rate limiting capacity in this pool\n  function _consumeInboundRateLimit(uint64 remoteChainSelector, uint256 amount) internal {\n    s_inboundRateLimits[remoteChainSelector]._consume(amount, address(i_token));\n  }\n\n  /// @notice Gets the token bucket with its values for the block it was requested at.\n  /// @return The token bucket.\n  function getCurrentOutboundRateLimiterState(\n    uint64 remoteChainSelector\n  ) external view returns (RateLimiter.TokenBucket memory) {\n    return s_outboundRateLimits[remoteChainSelector]._currentTokenBucketState();\n  }\n\n  /// @notice Gets the token bucket with its values for the block it was requested at.\n  /// @return The token bucket.\n  function getCurrentInboundRateLimiterState(\n    uint64 remoteChainSelector\n  ) external view returns (RateLimiter.TokenBucket memory) {\n    return s_inboundRateLimits[remoteChainSelector]._currentTokenBucketState();\n  }\n\n  /// @notice Sets the chain rate limiter config.\n  /// @param remoteChainSelector The remote chain selector for which the rate limits apply.\n  /// @param outboundConfig The new outbound rate limiter config, meaning the onRamp rate limits for the given chain.\n  /// @param inboundConfig The new inbound rate limiter config, meaning the offRamp rate limits for the given chain.\n  function setChainRateLimiterConfig(\n    uint64 remoteChainSelector,\n    RateLimiter.Config memory outboundConfig,\n    RateLimiter.Config memory inboundConfig\n  ) external virtual onlyOwner {\n    _setRateLimitConfig(remoteChainSelector, outboundConfig, inboundConfig);\n  }\n\n  function _setRateLimitConfig(\n    uint64 remoteChainSelector,\n    RateLimiter.Config memory outboundConfig,\n    RateLimiter.Config memory inboundConfig\n  ) internal {\n    if (!isSupportedChain(remoteChainSelector)) revert NonExistentChain(remoteChainSelector);\n    RateLimiter._validateTokenBucketConfig(outboundConfig, false);\n    s_outboundRateLimits[remoteChainSelector]._setTokenBucketConfig(outboundConfig);\n    RateLimiter._validateTokenBucketConfig(inboundConfig, false);\n    s_inboundRateLimits[remoteChainSelector]._setTokenBucketConfig(inboundConfig);\n    emit ChainConfigured(remoteChainSelector, outboundConfig, inboundConfig);\n  }\n\n  // ================================================================\n  // │                           Access                             │\n  // ================================================================\n\n  /// @notice Checks whether remote chain selector is configured on this contract, and if the msg.sender\n  /// is a permissioned onRamp for the given chain on the Router.\n  modifier onlyOnRamp(uint64 remoteChainSelector) {\n    if (!isSupportedChain(remoteChainSelector)) revert ChainNotAllowed(remoteChainSelector);\n    if (!(msg.sender == s_router.getOnRamp(remoteChainSelector))) revert CallerIsNotARampOnRouter(msg.sender);\n    _;\n  }\n\n  /// @notice Checks whether remote chain selector is configured on this contract, and if the msg.sender\n  /// is a permissioned offRamp for the given chain on the Router.\n  modifier onlyOffRamp(uint64 remoteChainSelector) {\n    if (!isSupportedChain(remoteChainSelector)) revert ChainNotAllowed(remoteChainSelector);\n    if (!s_router.isOffRamp(remoteChainSelector, msg.sender)) revert CallerIsNotARampOnRouter(msg.sender);\n    _;\n  }\n\n  // ================================================================\n  // │                          Allowlist                           │\n  // ================================================================\n\n  modifier checkAllowList(address sender) {\n    if (i_allowlistEnabled && !s_allowList.contains(sender)) revert SenderNotAllowed(sender);\n    _;\n  }\n\n  /// @notice Gets whether the allowList functionality is enabled.\n  /// @return true is enabled, false if not.\n  function getAllowListEnabled() external view returns (bool) {\n    return i_allowlistEnabled;\n  }\n\n  /// @notice Gets the allowed addresses.\n  /// @return The allowed addresses.\n  function getAllowList() external view returns (address[] memory) {\n    return s_allowList.values();\n  }\n\n  /// @notice Apply updates to the allow list.\n  /// @param removes The addresses to be removed.\n  /// @param adds The addresses to be added.\n  /// @dev allowListing will be removed before public launch\n  function applyAllowListUpdates(address[] calldata removes, address[] calldata adds) external onlyOwner {\n    _applyAllowListUpdates(removes, adds);\n  }\n\n  /// @notice Internal version of applyAllowListUpdates to allow for reuse in the constructor.\n  function _applyAllowListUpdates(address[] memory removes, address[] memory adds) internal {\n    if (!i_allowlistEnabled) revert AllowListNotEnabled();\n\n    for (uint256 i = 0; i < removes.length; ++i) {\n      address toRemove = removes[i];\n      if (s_allowList.remove(toRemove)) {\n        emit AllowListRemove(toRemove);\n      }\n    }\n    for (uint256 i = 0; i < adds.length; ++i) {\n      address toAdd = adds[i];\n      if (toAdd == address(0)) {\n        continue;\n      }\n      if (s_allowList.add(toAdd)) {\n        emit AllowListAdd(toAdd);\n      }\n    }\n  }\n\n  /// @notice Ensure that there is no active curse.\n  modifier whenHealthy() {\n    if (IARM(i_armProxy).isCursed()) revert BadARMSignal();\n    _;\n  }\n}\n"
      },
      "src/v0.8/ccip/pools/BurnMintTokenPoolAbstract.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.19;\n\nimport {IBurnMintERC20} from \"../../shared/token/ERC20/IBurnMintERC20.sol\";\n\nimport {TokenPool} from \"./TokenPool.sol\";\n\nabstract contract BurnMintTokenPoolAbstract is TokenPool {\n  /// @notice Contains the specific burn call for a pool.\n  /// @dev overriding this method allows us to create pools with different burn signatures\n  /// without duplicating the underlying logic.\n  function _burn(uint256 amount) internal virtual;\n\n  /// @notice Burn the token in the pool\n  /// @param amount Amount to burn\n  /// @dev The whenHealthy check is important to ensure that even if a ramp is compromised\n  /// we're able to stop token movement via ARM.\n  function lockOrBurn(\n    address originalSender,\n    bytes calldata,\n    uint256 amount,\n    uint64 remoteChainSelector,\n    bytes calldata\n  )\n    external\n    virtual\n    override\n    onlyOnRamp(remoteChainSelector)\n    checkAllowList(originalSender)\n    whenHealthy\n    returns (bytes memory)\n  {\n    _consumeOutboundRateLimit(remoteChainSelector, amount);\n    _burn(amount);\n    emit Burned(msg.sender, amount);\n    return \"\";\n  }\n\n  /// @notice Mint tokens from the pool to the recipient\n  /// @param receiver Recipient address\n  /// @param amount Amount to mint\n  /// @dev The whenHealthy check is important to ensure that even if a ramp is compromised\n  /// we're able to stop token movement via ARM.\n  function releaseOrMint(\n    bytes memory,\n    address receiver,\n    uint256 amount,\n    uint64 remoteChainSelector,\n    bytes memory\n  ) external virtual override whenHealthy onlyOffRamp(remoteChainSelector) {\n    _consumeInboundRateLimit(remoteChainSelector, amount);\n    IBurnMintERC20(address(i_token)).mint(receiver, amount);\n    emit Minted(msg.sender, receiver, amount);\n  }\n}\n"
      },
      "src/v0.8/vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n  /**\n   * @dev Emitted when `value` tokens are moved from one account (`from`) to\n   * another (`to`).\n   *\n   * Note that `value` may be zero.\n   */\n  event Transfer(address indexed from, address indexed to, uint256 value);\n\n  /**\n   * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n   * a call to {approve}. `value` is the new allowance.\n   */\n  event Approval(address indexed owner, address indexed spender, uint256 value);\n\n  /**\n   * @dev Returns the amount of tokens in existence.\n   */\n  function totalSupply() external view returns (uint256);\n\n  /**\n   * @dev Returns the amount of tokens owned by `account`.\n   */\n  function balanceOf(address account) external view returns (uint256);\n\n  /**\n   * @dev Moves `amount` tokens from the caller's account to `to`.\n   *\n   * Returns a boolean value indicating whether the operation succeeded.\n   *\n   * Emits a {Transfer} event.\n   */\n  function transfer(address to, uint256 amount) external returns (bool);\n\n  /**\n   * @dev Returns the remaining number of tokens that `spender` will be\n   * allowed to spend on behalf of `owner` through {transferFrom}. This is\n   * zero by default.\n   *\n   * This value changes when {approve} or {transferFrom} are called.\n   */\n  function allowance(address owner, address spender) external view returns (uint256);\n\n  /**\n   * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n   *\n   * Returns a boolean value indicating whether the operation succeeded.\n   *\n   * IMPORTANT: Beware that changing an allowance with this method brings the risk\n   * that someone may use both the old and the new allowance by unfortunate\n   * transaction ordering. One possible solution to mitigate this race\n   * condition is to first reduce the spender's allowance to 0 and set the\n   * desired value afterwards:\n   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n   *\n   * Emits an {Approval} event.\n   */\n  function approve(address spender, uint256 amount) external returns (bool);\n\n  /**\n   * @dev Moves `amount` tokens from `from` to `to` using the\n   * allowance mechanism. `amount` is then deducted from the caller's\n   * allowance.\n   *\n   * Returns a boolean value indicating whether the operation succeeded.\n   *\n   * Emits a {Transfer} event.\n   */\n  function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n"
      },
      "src/v0.8/ccip/interfaces/pools/IPool.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol\";\n\n// Shared public interface for multiple pool types.\n// Each pool type handles a different child token model (lock/unlock, mint/burn.)\ninterface IPool {\n  /// @notice Lock tokens into the pool or burn the tokens.\n  /// @param originalSender Original sender of the tokens.\n  /// @param receiver Receiver of the tokens on destination chain.\n  /// @param amount Amount to lock or burn.\n  /// @param remoteChainSelector Destination chain Id.\n  /// @param extraArgs Additional data passed in by sender for lockOrBurn processing\n  /// in custom pools on source chain.\n  /// @return retData Optional field that contains bytes. Unused for now but already\n  /// implemented to allow future upgrades while preserving the interface.\n  function lockOrBurn(\n    address originalSender,\n    bytes calldata receiver,\n    uint256 amount,\n    uint64 remoteChainSelector,\n    bytes calldata extraArgs\n  ) external returns (bytes memory);\n\n  /// @notice Releases or mints tokens to the receiver address.\n  /// @param originalSender Original sender of the tokens.\n  /// @param receiver Receiver of the tokens.\n  /// @param amount Amount to release or mint.\n  /// @param remoteChainSelector Source chain Id.\n  /// @param extraData Additional data supplied offchain for releaseOrMint processing in\n  /// custom pools on dest chain. This could be an attestation that was retrieved through a\n  /// third party API.\n  /// @dev offchainData can come from any untrusted source.\n  function releaseOrMint(\n    bytes memory originalSender,\n    address receiver,\n    uint256 amount,\n    uint64 remoteChainSelector,\n    bytes memory extraData\n  ) external;\n\n  /// @notice Gets the IERC20 token that this pool can lock or burn.\n  /// @return token The IERC20 token representation.\n  function getToken() external view returns (IERC20 token);\n}\n"
      },
      "src/v0.8/ccip/interfaces/IARM.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @notice This interface contains the only ARM-related functions that might be used on-chain by other CCIP contracts.\ninterface IARM {\n  /// @notice A Merkle root tagged with the address of the commit store contract it is destined for.\n  struct TaggedRoot {\n    address commitStore;\n    bytes32 root;\n  }\n\n  /// @notice Callers MUST NOT cache the return value as a blessed tagged root could become unblessed.\n  function isBlessed(TaggedRoot calldata taggedRoot) external view returns (bool);\n\n  /// @notice When the ARM is \"cursed\", CCIP pauses until the curse is lifted.\n  function isCursed() external view returns (bool);\n}\n"
      },
      "src/v0.8/ccip/interfaces/IRouter.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Client} from \"../libraries/Client.sol\";\n\ninterface IRouter {\n  error OnlyOffRamp();\n\n  /// @notice Route the message to its intended receiver contract.\n  /// @param message Client.Any2EVMMessage struct.\n  /// @param gasForCallExactCheck of params for exec\n  /// @param gasLimit set of params for exec\n  /// @param receiver set of params for exec\n  /// @dev if the receiver is a contracts that signals support for CCIP execution through EIP-165.\n  /// the contract is called. If not, only tokens are transferred.\n  /// @return success A boolean value indicating whether the ccip message was received without errors.\n  /// @return retBytes A bytes array containing return data form CCIP receiver.\n  /// @return gasUsed the gas used by the external customer call. Does not include any overhead.\n  function routeMessage(\n    Client.Any2EVMMessage calldata message,\n    uint16 gasForCallExactCheck,\n    uint256 gasLimit,\n    address receiver\n  ) external returns (bool success, bytes memory retBytes, uint256 gasUsed);\n\n  /// @notice Returns the configured onramp for a specific destination chain.\n  /// @param destChainSelector The destination chain Id to get the onRamp for.\n  /// @return onRampAddress The address of the onRamp.\n  function getOnRamp(uint64 destChainSelector) external view returns (address onRampAddress);\n\n  /// @notice Return true if the given offRamp is a configured offRamp for the given source chain.\n  /// @param sourceChainSelector The source chain selector to check.\n  /// @param offRamp The address of the offRamp to check.\n  function isOffRamp(uint64 sourceChainSelector, address offRamp) external view returns (bool isOffRamp);\n}\n"
      },
      "src/v0.8/shared/access/OwnerIsCreator.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ConfirmedOwner} from \"./ConfirmedOwner.sol\";\n\n/// @title The OwnerIsCreator contract\n/// @notice A contract with helpers for basic contract ownership.\ncontract OwnerIsCreator is ConfirmedOwner {\n  constructor() ConfirmedOwner(msg.sender) {}\n}\n"
      },
      "src/v0.8/ccip/libraries/RateLimiter.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.0;\n\n/// @notice Implements Token Bucket rate limiting.\n/// @dev uint128 is safe for rate limiter state.\n/// For USD value rate limiting, it can adequately store USD value in 18 decimals.\n/// For ERC20 token amount rate limiting, all tokens that will be listed will have at most\n/// a supply of uint128.max tokens, and it will therefore not overflow the bucket.\n/// In exceptional scenarios where tokens consumed may be larger than uint128,\n/// e.g. compromised issuer, an enabled RateLimiter will check and revert.\nlibrary RateLimiter {\n  error BucketOverfilled();\n  error OnlyCallableByAdminOrOwner();\n  error TokenMaxCapacityExceeded(uint256 capacity, uint256 requested, address tokenAddress);\n  error TokenRateLimitReached(uint256 minWaitInSeconds, uint256 available, address tokenAddress);\n  error AggregateValueMaxCapacityExceeded(uint256 capacity, uint256 requested);\n  error AggregateValueRateLimitReached(uint256 minWaitInSeconds, uint256 available);\n  error InvalidRatelimitRate(Config rateLimiterConfig);\n  error DisabledNonZeroRateLimit(Config config);\n  error RateLimitMustBeDisabled();\n\n  event TokensConsumed(uint256 tokens);\n  event ConfigChanged(Config config);\n\n  struct TokenBucket {\n    uint128 tokens; // ──────╮ Current number of tokens that are in the bucket.\n    uint32 lastUpdated; //   │ Timestamp in seconds of the last token refill, good for 100+ years.\n    bool isEnabled; // ──────╯ Indication whether the rate limiting is enabled or not\n    uint128 capacity; // ────╮ Maximum number of tokens that can be in the bucket.\n    uint128 rate; // ────────╯ Number of tokens per second that the bucket is refilled.\n  }\n\n  struct Config {\n    bool isEnabled; // Indication whether the rate limiting should be enabled\n    uint128 capacity; // ────╮ Specifies the capacity of the rate limiter\n    uint128 rate; //  ───────╯ Specifies the rate of the rate limiter\n  }\n\n  /// @notice _consume removes the given tokens from the pool, lowering the\n  /// rate tokens allowed to be consumed for subsequent calls.\n  /// @param requestTokens The total tokens to be consumed from the bucket.\n  /// @param tokenAddress The token to consume capacity for, use 0x0 to indicate aggregate value capacity.\n  /// @dev Reverts when requestTokens exceeds bucket capacity or available tokens in the bucket\n  /// @dev emits removal of requestTokens if requestTokens is > 0\n  function _consume(TokenBucket storage s_bucket, uint256 requestTokens, address tokenAddress) internal {\n    // If there is no value to remove or rate limiting is turned off, skip this step to reduce gas usage\n    if (!s_bucket.isEnabled || requestTokens == 0) {\n      return;\n    }\n\n    uint256 tokens = s_bucket.tokens;\n    uint256 capacity = s_bucket.capacity;\n    uint256 timeDiff = block.timestamp - s_bucket.lastUpdated;\n\n    if (timeDiff != 0) {\n      if (tokens > capacity) revert BucketOverfilled();\n\n      // Refill tokens when arriving at a new block time\n      tokens = _calculateRefill(capacity, tokens, timeDiff, s_bucket.rate);\n\n      s_bucket.lastUpdated = uint32(block.timestamp);\n    }\n\n    if (capacity < requestTokens) {\n      // Token address 0 indicates consuming aggregate value rate limit capacity.\n      if (tokenAddress == address(0)) revert AggregateValueMaxCapacityExceeded(capacity, requestTokens);\n      revert TokenMaxCapacityExceeded(capacity, requestTokens, tokenAddress);\n    }\n    if (tokens < requestTokens) {\n      uint256 rate = s_bucket.rate;\n      // Wait required until the bucket is refilled enough to accept this value, round up to next higher second\n      // Consume is not guaranteed to succeed after wait time passes if there is competing traffic.\n      // This acts as a lower bound of wait time.\n      uint256 minWaitInSeconds = ((requestTokens - tokens) + (rate - 1)) / rate;\n\n      if (tokenAddress == address(0)) revert AggregateValueRateLimitReached(minWaitInSeconds, tokens);\n      revert TokenRateLimitReached(minWaitInSeconds, tokens, tokenAddress);\n    }\n    tokens -= requestTokens;\n\n    // Downcast is safe here, as tokens is not larger than capacity\n    s_bucket.tokens = uint128(tokens);\n    emit TokensConsumed(requestTokens);\n  }\n\n  /// @notice Gets the token bucket with its values for the block it was requested at.\n  /// @return The token bucket.\n  function _currentTokenBucketState(TokenBucket memory bucket) internal view returns (TokenBucket memory) {\n    // We update the bucket to reflect the status at the exact time of the\n    // call. This means we might need to refill a part of the bucket based\n    // on the time that has passed since the last update.\n    bucket.tokens = uint128(\n      _calculateRefill(bucket.capacity, bucket.tokens, block.timestamp - bucket.lastUpdated, bucket.rate)\n    );\n    bucket.lastUpdated = uint32(block.timestamp);\n    return bucket;\n  }\n\n  /// @notice Sets the rate limited config.\n  /// @param s_bucket The token bucket\n  /// @param config The new config\n  function _setTokenBucketConfig(TokenBucket storage s_bucket, Config memory config) internal {\n    // First update the bucket to make sure the proper rate is used for all the time\n    // up until the config change.\n    uint256 timeDiff = block.timestamp - s_bucket.lastUpdated;\n    if (timeDiff != 0) {\n      s_bucket.tokens = uint128(_calculateRefill(s_bucket.capacity, s_bucket.tokens, timeDiff, s_bucket.rate));\n\n      s_bucket.lastUpdated = uint32(block.timestamp);\n    }\n\n    s_bucket.tokens = uint128(_min(config.capacity, s_bucket.tokens));\n    s_bucket.isEnabled = config.isEnabled;\n    s_bucket.capacity = config.capacity;\n    s_bucket.rate = config.rate;\n\n    emit ConfigChanged(config);\n  }\n\n  /// @notice Validates the token bucket config\n  function _validateTokenBucketConfig(Config memory config, bool mustBeDisabled) internal pure {\n    if (config.isEnabled) {\n      if (config.rate >= config.capacity || config.rate == 0) {\n        revert InvalidRatelimitRate(config);\n      }\n      if (mustBeDisabled) {\n        revert RateLimitMustBeDisabled();\n      }\n    } else {\n      if (config.rate != 0 || config.capacity != 0) {\n        revert DisabledNonZeroRateLimit(config);\n      }\n    }\n  }\n\n  /// @notice Calculate refilled tokens\n  /// @param capacity bucket capacity\n  /// @param tokens current bucket tokens\n  /// @param timeDiff block time difference since last refill\n  /// @param rate bucket refill rate\n  /// @return the value of tokens after refill\n  function _calculateRefill(\n    uint256 capacity,\n    uint256 tokens,\n    uint256 timeDiff,\n    uint256 rate\n  ) private pure returns (uint256) {\n    return _min(capacity, tokens + timeDiff * rate);\n  }\n\n  /// @notice Return the smallest of two integers\n  /// @param a first int\n  /// @param b second int\n  /// @return smallest\n  function _min(uint256 a, uint256 b) internal pure returns (uint256) {\n    return a < b ? a : b;\n  }\n}\n"
      },
      "src/v0.8/vendor/openzeppelin-solidity/v4.8.3/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}"
      },
      "src/v0.8/vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n  // To implement this library for multiple types with as little code\n  // repetition as possible, we write it in terms of a generic Set type with\n  // bytes32 values.\n  // The Set implementation uses private functions, and user-facing\n  // implementations (such as AddressSet) are just wrappers around the\n  // underlying Set.\n  // This means that we can only create new EnumerableSets for types that fit\n  // in bytes32.\n\n  struct Set {\n    // Storage of set values\n    bytes32[] _values;\n    // Position of the value in the `values` array, plus 1 because index 0\n    // means a value is not in the set.\n    mapping(bytes32 => uint256) _indexes;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function _add(Set storage set, bytes32 value) private returns (bool) {\n    if (!_contains(set, value)) {\n      set._values.push(value);\n      // The value is stored at length-1, but we add 1 to all indexes\n      // and use 0 as a sentinel value\n      set._indexes[value] = set._values.length;\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function _remove(Set storage set, bytes32 value) private returns (bool) {\n    // We read and store the value's index to prevent multiple reads from the same storage slot\n    uint256 valueIndex = set._indexes[value];\n\n    if (valueIndex != 0) {\n      // Equivalent to contains(set, value)\n      // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n      // the array, and then remove the last element (sometimes called as 'swap and pop').\n      // This modifies the order of the array, as noted in {at}.\n\n      uint256 toDeleteIndex = valueIndex - 1;\n      uint256 lastIndex = set._values.length - 1;\n\n      if (lastIndex != toDeleteIndex) {\n        bytes32 lastValue = set._values[lastIndex];\n\n        // Move the last value to the index where the value to delete is\n        set._values[toDeleteIndex] = lastValue;\n        // Update the index for the moved value\n        set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n      }\n\n      // Delete the slot where the moved value was stored\n      set._values.pop();\n\n      // Delete the index for the deleted slot\n      delete set._indexes[value];\n\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function _contains(Set storage set, bytes32 value) private view returns (bool) {\n    return set._indexes[value] != 0;\n  }\n\n  /**\n   * @dev Returns the number of values on the set. O(1).\n   */\n  function _length(Set storage set) private view returns (uint256) {\n    return set._values.length;\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function _at(Set storage set, uint256 index) private view returns (bytes32) {\n    return set._values[index];\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function _values(Set storage set) private view returns (bytes32[] memory) {\n    return set._values;\n  }\n\n  // Bytes32Set\n\n  struct Bytes32Set {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n    return _add(set._inner, value);\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n    return _remove(set._inner, value);\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n    return _contains(set._inner, value);\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(Bytes32Set storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n    return _at(set._inner, index);\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n    bytes32[] memory store = _values(set._inner);\n    bytes32[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n\n  // AddressSet\n\n  struct AddressSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(AddressSet storage set, address value) internal returns (bool) {\n    return _add(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(AddressSet storage set, address value) internal returns (bool) {\n    return _remove(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(AddressSet storage set, address value) internal view returns (bool) {\n    return _contains(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(AddressSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(AddressSet storage set, uint256 index) internal view returns (address) {\n    return address(uint160(uint256(_at(set._inner, index))));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(AddressSet storage set) internal view returns (address[] memory) {\n    bytes32[] memory store = _values(set._inner);\n    address[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n\n  // UintSet\n\n  struct UintSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(UintSet storage set, uint256 value) internal returns (bool) {\n    return _add(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(UintSet storage set, uint256 value) internal returns (bool) {\n    return _remove(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n    return _contains(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(UintSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n    return uint256(_at(set._inner, index));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(UintSet storage set) internal view returns (uint256[] memory) {\n    bytes32[] memory store = _values(set._inner);\n    uint256[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n}\n"
      },
      "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"
      },
      "src/v0.8/shared/access/ConfirmedOwner.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ConfirmedOwnerWithProposal} from \"./ConfirmedOwnerWithProposal.sol\";\n\n/// @title The ConfirmedOwner contract\n/// @notice A contract with helpers for basic contract ownership.\ncontract ConfirmedOwner is ConfirmedOwnerWithProposal {\n  constructor(address newOwner) ConfirmedOwnerWithProposal(newOwner, address(0)) {}\n}\n"
      },
      "src/v0.8/shared/access/ConfirmedOwnerWithProposal.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IOwnable} from \"../interfaces/IOwnable.sol\";\n\n/// @title The ConfirmedOwner contract\n/// @notice A contract with helpers for basic contract ownership.\ncontract ConfirmedOwnerWithProposal is IOwnable {\n  address private s_owner;\n  address private s_pendingOwner;\n\n  event OwnershipTransferRequested(address indexed from, address indexed to);\n  event OwnershipTransferred(address indexed from, address indexed to);\n\n  constructor(address newOwner, address pendingOwner) {\n    // solhint-disable-next-line custom-errors\n    require(newOwner != address(0), \"Cannot set owner to zero\");\n\n    s_owner = newOwner;\n    if (pendingOwner != address(0)) {\n      _transferOwnership(pendingOwner);\n    }\n  }\n\n  /// @notice Allows an owner to begin transferring ownership to a new address.\n  function transferOwnership(address to) public override onlyOwner {\n    _transferOwnership(to);\n  }\n\n  /// @notice Allows an ownership transfer to be completed by the recipient.\n  function acceptOwnership() external override {\n    // solhint-disable-next-line custom-errors\n    require(msg.sender == s_pendingOwner, \"Must be proposed owner\");\n\n    address oldOwner = s_owner;\n    s_owner = msg.sender;\n    s_pendingOwner = address(0);\n\n    emit OwnershipTransferred(oldOwner, msg.sender);\n  }\n\n  /// @notice Get the current owner\n  function owner() public view override returns (address) {\n    return s_owner;\n  }\n\n  /// @notice validate, transfer ownership, and emit relevant events\n  function _transferOwnership(address to) private {\n    // solhint-disable-next-line custom-errors\n    require(to != msg.sender, \"Cannot transfer to self\");\n\n    s_pendingOwner = to;\n\n    emit OwnershipTransferRequested(s_owner, to);\n  }\n\n  /// @notice validate access\n  function _validateOwnership() internal view {\n    // solhint-disable-next-line custom-errors\n    require(msg.sender == s_owner, \"Only callable by owner\");\n  }\n\n  /// @notice Reverts if called by anyone other than the contract owner.\n  modifier onlyOwner() {\n    _validateOwnership();\n    _;\n  }\n}\n"
      },
      "src/v0.8/shared/interfaces/IOwnable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IOwnable {\n  function owner() external returns (address);\n\n  function transferOwnership(address recipient) external;\n\n  function acceptOwnership() external;\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "ds-test/=foundry-lib/forge-std/lib/ds-test/src/",
        "forge-std/=foundry-lib/forge-std/src/",
        "@openzeppelin/=node_modules/@openzeppelin/",
        "@arbitrum/=node_modules/@arbitrum/",
        "hardhat/=node_modules/hardhat/",
        "@eth-optimism/=node_modules/@eth-optimism/",
        "@scroll-tech/=node_modules/@scroll-tech/",
        "@ensdomains/=node_modules/@ensdomains/",
        "@offchainlabs/=node_modules/@offchainlabs/",
        "eth-gas-reporter/=node_modules/eth-gas-reporter/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 26000
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "none",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "libraries": {}
    }
  }}