From 209130e0fe79d2dd283bc2a5d90317d815c21486 Mon Sep 17 00:00:00 2001 From: Yudi Levi Date: Sat, 12 Oct 2024 09:16:50 +0100 Subject: [PATCH] updated mainnet artifacts --- data/named-accounts.ts | 16 +- deployments/mainnet/.migrations.json | 3 +- deployments/mainnet/CarbonVortex.json | 59 +- .../mainnet/CarbonVortex_Implementation.json | 321 ++++---- pnpm-lock.yaml | 717 +++++++++--------- 5 files changed, 556 insertions(+), 560 deletions(-) diff --git a/data/named-accounts.ts b/data/named-accounts.ts index dbb6bda..be2928c 100644 --- a/data/named-accounts.ts +++ b/data/named-accounts.ts @@ -86,7 +86,7 @@ const blast = (address: string) => { return { [DeploymentNetwork.Blast]: address }; -} +}; const celo = (address: string) => { if (TENDERLY_NETWORK_ID === chainIds[DeploymentNetwork.Celo]) { @@ -99,7 +99,7 @@ const celo = (address: string) => { return { [DeploymentNetwork.Celo]: address }; -} +}; const sei = (address: string) => { if (TENDERLY_NETWORK_ID === chainIds[DeploymentNetwork.Sei]) { @@ -112,7 +112,7 @@ const sei = (address: string) => { return { [DeploymentNetwork.Sei]: address }; -} +}; const fantom = (address: string) => { if (TENDERLY_NETWORK_ID === chainIds[DeploymentNetwork.Fantom]) { @@ -125,7 +125,7 @@ const fantom = (address: string) => { return { [DeploymentNetwork.Fantom]: address }; -} +}; const linea = (address: string) => { if (TENDERLY_NETWORK_ID === chainIds[DeploymentNetwork.Linea]) { @@ -138,7 +138,7 @@ const linea = (address: string) => { return { [DeploymentNetwork.Linea]: address }; -} +}; const telos = (address: string) => { if (TENDERLY_NETWORK_ID === chainIds[DeploymentNetwork.Telos]) { @@ -151,7 +151,7 @@ const telos = (address: string) => { return { [DeploymentNetwork.Telos]: address }; -} +}; const TestNamedAccounts = { ethWhale: { @@ -232,7 +232,7 @@ const BancorNamedAccounts = { ...getAddress(mainnet, '0xeEF417e1D5CC832e619ae18D2F140De2999dD4fB') }, vault: { - ...getAddress(mainnet, ZERO_ADDRESS), + ...getAddress(mainnet, '0x60917e542aDdd13bfd1a7f81cD654758052dAdC4'), ...getAddress(base, '0xD2b2D272c30d9a0ff3DbaFe848DA7e2f194f697F'), ...getAddress(blast, '0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8'), ...getAddress(celo, '0x8cE318919438982514F9f479FDfB40D32C6ab749'), @@ -254,7 +254,7 @@ const VortexNamedAccounts = { transferAddress: { ...getAddress(mainnet, '0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C') } -} +}; function getAddress(func: (arg: string) => object | undefined, arg: string): object { const result = func(arg); diff --git a/deployments/mainnet/.migrations.json b/deployments/mainnet/.migrations.json index 92599a7..d69d72f 100644 --- a/deployments/mainnet/.migrations.json +++ b/deployments/mainnet/.migrations.json @@ -14,5 +14,6 @@ "0013-CarbonController-upgrade": 1710324184, "0014-ProxyAdmin": 1722945520, "0015-CarbonVortex": 1722945638, - "0016-CarbonVortex-upgrade": 1725443119 + "0016-CarbonVortex-upgrade": 1725443119, + "0017-CarbonVortex-upgrade": 1728720582 } \ No newline at end of file diff --git a/deployments/mainnet/CarbonVortex.json b/deployments/mainnet/CarbonVortex.json index 3cd8d2d..b4999c2 100644 --- a/deployments/mainnet/CarbonVortex.json +++ b/deployments/mainnet/CarbonVortex.json @@ -596,6 +596,25 @@ "name": "TradingReset", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "prevTransferAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTransferAddress", + "type": "address" + } + ], + "name": "TransferAddressUpdated", + "type": "event" + }, { "inputs": [], "name": "DEFAULT_ADMIN_ROLE", @@ -844,7 +863,13 @@ "type": "function" }, { - "inputs": [], + "inputs": [ + { + "internalType": "address payable", + "name": "transferAddressInit", + "type": "address" + } + ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", @@ -1124,6 +1149,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTransferAddress", + "type": "address" + } + ], + "name": "setTransferAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1293,6 +1331,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "transferAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "version", @@ -1537,8 +1588,8 @@ "0x059D3D353336886CFAf17383C9Fb6715652cf9A1", "0x8129fc1c" ], - "numDeployments": 2, - "solcInputHash": "68a345b31e155d3c1f9578277e57587a", + "numDeployments": 3, + "solcInputHash": "2dd0095b2cdd7d4dbea7e28972cf9b6c", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60a060405260405162000db038038062000db0833981016040819052620000269162000403565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620004e3565b60008051602062000d698339815191521462000075576200007562000505565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620004e3565b60008051602062000d4983398151915214620000d357620000d362000505565b6001600160a01b038216608081905260008051602062000d498339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a1505050506200056e565b62000147836200016e565b600082511180620001555750805b156200016957620001678383620001b0565b505b505050565b6200017981620001e1565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001d8838360405180606001604052806027815260200162000d896027913962000284565b90505b92915050565b6001600160a01b0381163b620002545760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b60008051602062000d6983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60606001600160a01b0384163b620002ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200024b565b600080856001600160a01b0316856040516200030b91906200051b565b600060405180830381855af49150503d806000811462000348576040519150601f19603f3d011682016040523d82523d6000602084013e6200034d565b606091505b509092509050620003608282866200036c565b925050505b9392505050565b606083156200037d57508162000365565b8251156200038e5782518084602001fd5b8160405162461bcd60e51b81526004016200024b919062000539565b80516001600160a01b0381168114620003c257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003fa578181015183820152602001620003e0565b50506000910152565b6000806000606084860312156200041957600080fd5b6200042484620003aa565b92506200043460208501620003aa565b60408501519092506001600160401b03808211156200045257600080fd5b818601915086601f8301126200046757600080fd5b8151818111156200047c576200047c620003c7565b604051601f8201601f19908116603f01168101908382118183101715620004a757620004a7620003c7565b81604052828152896020848701011115620004c157600080fd5b620004d4836020830160208801620003dd565b80955050505050509250925092565b81810381811115620001db57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b600082516200052f818460208701620003dd565b9190910192915050565b60208152600082518060208401526200055a816040850160208701620003dd565b601f01601f19169190910160400192915050565b60805161079d620005ac6000396000818160ef01528181610145015281816101c701528181610211015281816102420152610266015261079d6000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000a", @@ -1549,7 +1600,7 @@ "0x" ] }, - "implementation": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", + "implementation": "0x2c0fA8B5C3a26AE8f014eFB50ff27D95DD923502", "devdoc": { "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", "events": { diff --git a/deployments/mainnet/CarbonVortex_Implementation.json b/deployments/mainnet/CarbonVortex_Implementation.json index 0ab51a1..d2480f9 100644 --- a/deployments/mainnet/CarbonVortex_Implementation.json +++ b/deployments/mainnet/CarbonVortex_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", + "address": "0x2c0fA8B5C3a26AE8f014eFB50ff27D95DD923502", "abi": [ { "inputs": [ @@ -13,16 +13,6 @@ "name": "vault", "type": "address" }, - { - "internalType": "contract IVault", - "name": "oldVortex", - "type": "address" - }, - { - "internalType": "address payable", - "name": "transferAddress", - "type": "address" - }, { "internalType": "Token", "name": "targetTokenInit", @@ -522,6 +512,25 @@ "name": "TradingReset", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "prevTransferAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTransferAddress", + "type": "address" + } + ], + "name": "TransferAddressUpdated", + "type": "event" + }, { "inputs": [], "name": "DEFAULT_ADMIN_ROLE", @@ -770,7 +779,13 @@ "type": "function" }, { - "inputs": [], + "inputs": [ + { + "internalType": "address payable", + "name": "transferAddressInit", + "type": "address" + } + ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", @@ -1050,6 +1065,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTransferAddress", + "type": "address" + } + ], + "name": "setTransferAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1219,6 +1247,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "transferAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "version", @@ -1260,176 +1301,48 @@ "type": "receive" } ], - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", + "transactionHash": "0x0682bbcbc3690498b00fa63475139a3b9c314bb8038de8752fb6b49a25b33e60", "receipt": { "to": null, "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "transactionIndex": 195, - "gasUsed": "5215458", - "logsBloom": "0x000800040000000088000000000000000800400100000400100000000000001000000000000200000000000000000000000000000008000000100000000000000000000000000000000000200000000000000000000000000000080000000000080000000200004000000800000008000020000000000010100000000000000000000100000000010000000000000000000000000000a0002000008000040008000000000000000004000000000400000000000000000000101000200000000000000000000000100040000000140000000000000000000120200000040020000000010000000000000000020000000080000000000000000000000000000000", - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8", - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", + "contractAddress": "0x2c0fA8B5C3a26AE8f014eFB50ff27D95DD923502", + "transactionIndex": 11, + "gasUsed": "4878838", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000100000000000000000000000000000000000000080000000000000000000000000020000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1d5e74716ba9f9125b5d1d5b009a5aaaa4b69d75ca09ee490259a8b370ac717c", + "transactionHash": "0x0682bbcbc3690498b00fa63475139a3b9c314bb8038de8752fb6b49a25b33e60", "logs": [ { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 539, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 540, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001388", - "logIndex": 541, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 542, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", - "logIndex": 543, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", - "logIndex": 544, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", - "logIndex": 545, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", - "logIndex": 546, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", - "logIndex": 547, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", - "topics": [ - "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", - "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", - "logIndex": 548, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" - }, - { - "transactionIndex": 195, - "blockNumber": 20676399, - "transactionHash": "0x91b8b8e77a6698a449976698d1b3c71fcd9ad1beea4e90ecd8ae6a10b73f5352", - "address": "0x676B91Af9EaAE263485C95CcaFb2764228cE95c0", + "transactionIndex": 11, + "blockNumber": 20948234, + "transactionHash": "0x0682bbcbc3690498b00fa63475139a3b9c314bb8038de8752fb6b49a25b33e60", + "address": "0x2c0fA8B5C3a26AE8f014eFB50ff27D95DD923502", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 549, - "blockHash": "0x2eeae29f71b4ab035d92a738dbb2ba17557b864aff52c8f923dd5f9e62269ee8" + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 89, + "blockHash": "0x1d5e74716ba9f9125b5d1d5b009a5aaaa4b69d75ca09ee490259a8b370ac717c" } ], - "blockNumber": 20676399, - "cumulativeGasUsed": "25143783", + "blockNumber": 20948234, + "cumulativeGasUsed": "7101378", "status": 1, "byzantium": true }, "args": [ "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "0x0000000000000000000000000000000000000000", - "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C", + "0x60917e542aDdd13bfd1a7f81cD654758052dAdC4", "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C" ], - "numDeployments": 2, - "solcInputHash": "68a345b31e155d3c1f9578277e57587a", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ICarbonController\",\"name\":\"carbonController\",\"type\":\"address\"},{\"internalType\":\"contract IVault\",\"name\":\"vault\",\"type\":\"address\"},{\"internalType\":\"contract IVault\",\"name\":\"oldVortex\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"transferAddress\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetTokenInit\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"finalTargetTokenInit\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GreaterThanMaxInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientAmountForTrading\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientNativeTokenSent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAmountLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrade\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairDisabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TradingDisabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnnecessaryNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValue\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"prevTargetTokenSaleAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newTargetTokenSaleAmount\",\"type\":\"uint128\"}],\"name\":\"MaxTargetTokenSaleAmountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevMinTokenSaleAmountMultiplier\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newMinTokenSaleAmountMultiplier\",\"type\":\"uint32\"}],\"name\":\"MinTokenSaleAmountMultiplierUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"prevMinTokenSaleAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newMinTokenSaleAmount\",\"type\":\"uint128\"}],\"name\":\"MinTokenSaleAmountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"prevStatus\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"newStatus\",\"type\":\"bool\"}],\"name\":\"PairDisabledStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevPriceDecayHalfLife\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"PriceDecayHalfLifeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevPriceResetMultiplier\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newPriceResetMultiplier\",\"type\":\"uint32\"}],\"name\":\"PriceResetMultiplierUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"struct ICarbonVortex.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"name\":\"PriceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevRewardsPPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newRewardsPPM\",\"type\":\"uint32\"}],\"name\":\"RewardsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevPriceDecayHalfLife\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"TargetTokenPriceDecayHalfLifeOnResetUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevPriceDecayHalfLife\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"TargetTokenPriceDecayHalfLifeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"name\":\"TokenTraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"struct ICarbonVortex.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"name\":\"TradingReset\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"amountAvailableForTrading\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"availableTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"name\":\"disablePair\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"name\":\"expectedTradeInput\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"}],\"name\":\"expectedTradeReturn\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalTargetToken\",\"outputs\":[{\"internalType\":\"Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTargetTokenSaleAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"minTokenSaleAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTokenSaleAmountMultiplier\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"pairDisabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"checkVersion\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceDecayHalfLife\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceResetMultiplier\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsPPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newMaxTargetTokenSaleAmount\",\"type\":\"uint128\"}],\"name\":\"setMaxTargetTokenSaleAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newMinTargetTokenSaleAmount\",\"type\":\"uint128\"}],\"name\":\"setMinTargetTokenSaleAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newMinTokenSaleAmountMultiplier\",\"type\":\"uint32\"}],\"name\":\"setMinTokenSaleAmountMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"setPriceDecayHalfLife\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newPriceResetMultiplier\",\"type\":\"uint32\"}],\"name\":\"setPriceResetMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newRewardsPPM\",\"type\":\"uint32\"}],\"name\":\"setRewardsPPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"setTargetTokenPriceDecayHalfLife\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"setTargetTokenPriceDecayHalfLifeOnReset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetToken\",\"outputs\":[{\"internalType\":\"Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetTokenPriceDecayHalfLife\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetTokenPriceDecayHalfLifeOnReset\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetTokenSaleAmount\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"initial\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"current\",\"type\":\"uint128\"}],\"internalType\":\"struct ICarbonVortex.SaleAmount\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"tokenPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"internalType\":\"struct ICarbonVortex.Price\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalCollected\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"maxInput\",\"type\":\"uint128\"}],\"name\":\"trade\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"tradingEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"used to set immutable state variables and initialize the implementation\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize()\":{\"details\":\"fully initializes the contract and its parents\"},\"postUpgrade(bool,bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdrawFunds(address[],address,uint256[])\":{\"details\":\"withdraws funds held by the contract and sends them to an account requirements: - the caller must be the admin of the contract\"}},\"version\":1},\"userdoc\":{\"events\":{\"FundsWithdrawn(address[],address,address,uint256[])\":{\"notice\":\"triggered when tokens have been withdrawn by the admin\"},\"MaxTargetTokenSaleAmountUpdated(uint128,uint128)\":{\"notice\":\"triggered when the target token sale amount is updated\"},\"MinTokenSaleAmountMultiplierUpdated(uint32,uint32)\":{\"notice\":\"Triggered when the minimum token sale amount multiplier is updated\"},\"MinTokenSaleAmountUpdated(address,uint128,uint128)\":{\"notice\":\"triggered when the min token sale amount is updated\"},\"PairDisabledStatusUpdated(address,bool,bool)\":{\"notice\":\"triggered when pair status is updated\"},\"PriceDecayHalfLifeUpdated(uint32,uint32)\":{\"notice\":\"triggered when the price decay halflife is updated (for all tokens except the target token)\"},\"PriceResetMultiplierUpdated(uint32,uint32)\":{\"notice\":\"triggered when the price reset multiplier is updated\"},\"PriceUpdated(address,(uint128,uint128))\":{\"notice\":\"triggered after the price updates for a token\"},\"RewardsUpdated(uint32,uint32)\":{\"notice\":\"triggered when the rewards ppm are updated\"},\"TargetTokenPriceDecayHalfLifeOnResetUpdated(uint32,uint32)\":{\"notice\":\"triggered when the price decay halflife on price reset is updated (for the target token only)\"},\"TargetTokenPriceDecayHalfLifeUpdated(uint32,uint32)\":{\"notice\":\"triggered when the price decay halflife is updated (for the target token only)\"},\"TokenTraded(address,address,uint128,uint128)\":{\"notice\":\"triggered after a successful trade is executed\"},\"TradingReset(address,(uint128,uint128))\":{\"notice\":\"triggered when trading is reset for a token (dutch auction has been restarted)\"}},\"kind\":\"user\",\"methods\":{\"amountAvailableForTrading(address)\":{\"notice\":\"returns the amount available for trading for the token\"},\"availableTokens(address)\":{\"notice\":\"returns the total available fees for the given token\"},\"disablePair(address,bool)\":{\"notice\":\"sets if trading is enabled or disabled for a token requirements: - the caller must be the admin of the contract\"},\"execute(address[])\":{\"notice\":\"withdraws the fees of the provided token from Carbon andenables trading for the token if not already enabled\"},\"expectedTradeInput(address,uint128)\":{\"notice\":\"returns the source amount required given a target amount\"},\"expectedTradeReturn(address,uint128)\":{\"notice\":\"returns the target amount expected given a source amount\"},\"finalTargetToken()\":{\"notice\":\"returns the final target token\"},\"minTargetTokenSaleAmount()\":{\"notice\":\"returns the min target token sale amount\"},\"minTokenSaleAmount(address)\":{\"notice\":\"returns the min token sale amount\"},\"minTokenSaleAmountMultiplier()\":{\"notice\":\"returns the min token sale amount multiplier\"},\"pairDisabled(address)\":{\"notice\":\"returns true if pair is disabled (admin-controllable)\"},\"priceDecayHalfLife()\":{\"notice\":\"returns the price decay half-life for all tokens except the target tokenaccording to the exp decay formula\"},\"priceResetMultiplier()\":{\"notice\":\"returns the price reset multiplier\"},\"rewardsPPM()\":{\"notice\":\"returns the rewards ppm\"},\"setMaxTargetTokenSaleAmount(uint128)\":{\"notice\":\"sets the max (or initial) target token sale amount requirements: - the caller must be the admin of the contract\"},\"setMinTargetTokenSaleAmount(uint128)\":{\"notice\":\"sets the min target token sale amount requirements: - the caller must be the admin of the contract\"},\"setMinTokenSaleAmountMultiplier(uint32)\":{\"notice\":\"sets the minimum token sale amount multiplier Requirements: - The caller must be the admin of the contract.\"},\"setPriceDecayHalfLife(uint32)\":{\"notice\":\"sets the price decay half-life for all tokens except target requirements: - the caller must be the admin of the contract\"},\"setPriceResetMultiplier(uint32)\":{\"notice\":\"sets the price reset multiplier requirements: - the caller must be the admin of the contract\"},\"setRewardsPPM(uint32)\":{\"notice\":\"sets the rewards ppm requirements: - the caller must be the admin of the contract\"},\"setTargetTokenPriceDecayHalfLife(uint32)\":{\"notice\":\"sets the price decay half-life for the target token requirements: - the caller must be the admin of the contract\"},\"setTargetTokenPriceDecayHalfLifeOnReset(uint32)\":{\"notice\":\"sets the price decay half-life for the target token on reset Requirements: - The caller must be the admin of the contract.\"},\"targetToken()\":{\"notice\":\"returns the target token\"},\"targetTokenPriceDecayHalfLife()\":{\"notice\":\"returns the price decay half-life for the target token according to the exp decay formula\"},\"targetTokenPriceDecayHalfLifeOnReset()\":{\"notice\":\"returns the price decay half-life for the target token on reset (slow) according to the exp decay formula\"},\"targetTokenSaleAmount()\":{\"notice\":\"returns the initial and current target token sale amount\"},\"tokenPrice(address)\":{\"notice\":\"returns the current token price (targetToken / TKN)if token == targetToken, returns finalTargetToken / targetToken price\"},\"totalCollected()\":{\"notice\":\"returns the total target (if no final target token has been defined) or final target tokens collected \"},\"trade(address,uint128,uint128)\":{\"notice\":\"trades *targetToken* for *targetAmount* of *token* based on the current token price (trade by target amount)if token == *targetToken*, trades *finalTargetToken* for amount of *targetToken* and alsoresets the current token sale amount if it's below the min amount after a tradereverts if source amount required is greater than maxInput\"},\"tradingEnabled(address)\":{\"notice\":\"returns true if trading is enabled for token (dutch auction started)\"}},\"notice\":\"CarbonVortex contract\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vortex/CarbonVortex.sol\":\"CarbonVortex\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 * ```solidity\\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 * ```solidity\\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. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\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(IAccessControlUpgradeable).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 StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleRevoked} event.\\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 * May emit a {RoleRevoked} event.\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleRevoked} event.\\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 /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.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 IAccessControlUpgradeable {\\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\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\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 ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\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 /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\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 unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\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 unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\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] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable {\\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\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * ```solidity\\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 EnumerableSetUpgradeable {\\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\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\\n * 0 before setting it to a non-zero value.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"contracts/carbon/Pairs.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nstruct Pair {\\n uint128 id;\\n Token[2] tokens;\\n}\\n\\nabstract contract Pairs is Initializable {\\n error PairAlreadyExists();\\n error PairDoesNotExist();\\n\\n // unique incremental id representing a pair\\n uint128 private _lastPairId;\\n\\n // mapping of pairs of tokens to their pair id, tokens are sorted at any order\\n mapping(Token => mapping(Token => uint128)) private _pairIds;\\n\\n // mapping between a pairId to its Pair object\\n mapping(uint128 => Token[2]) private _pairsStorage;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 3] private __gap;\\n\\n /**\\n * @dev triggered when a new pair is created\\n */\\n event PairCreated(uint128 indexed pairId, Token indexed token0, Token indexed token1);\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Pairs_init() internal onlyInitializing {\\n __Pairs_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Pairs_init_unchained() internal onlyInitializing {}\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev generates and stores a new pair, tokens are assumed unique and valid\\n */\\n function _createPair(Token token0, Token token1) internal returns (Pair memory) {\\n // validate pair existence\\n if (_pairExists(token0, token1)) {\\n revert PairAlreadyExists();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // increment pair id\\n uint128 id = _lastPairId + 1;\\n _lastPairId = id;\\n\\n // store pair\\n _pairsStorage[id] = sortedTokens;\\n _pairIds[sortedTokens[0]][sortedTokens[1]] = id;\\n\\n emit PairCreated(id, sortedTokens[0], sortedTokens[1]);\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n /**\\n * @dev return a pair matching the given tokens\\n */\\n function _pair(Token token0, Token token1) internal view returns (Pair memory) {\\n // validate pair existence\\n if (!_pairExists(token0, token1)) {\\n revert PairDoesNotExist();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // return pair\\n uint128 id = _pairIds[sortedTokens[0]][sortedTokens[1]];\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n function _pairById(uint128 pairId) internal view returns (Pair memory) {\\n Token[2] memory tokens = _pairsStorage[pairId];\\n if (Token.unwrap(tokens[0]) == address(0)) {\\n revert PairDoesNotExist();\\n }\\n return Pair({ id: pairId, tokens: tokens });\\n }\\n\\n /**\\n * @dev check for the existence of a pair (pair id's are sequential integers starting at 1)\\n */\\n function _pairExists(Token token0, Token token1) internal view returns (bool) {\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n if (_pairIds[sortedTokens[0]][sortedTokens[1]] == 0) {\\n return false;\\n }\\n return true;\\n }\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function _pairs() internal view returns (Token[2][] memory) {\\n uint128 length = _lastPairId;\\n Token[2][] memory list = new Token[2][](length);\\n for (uint128 i = 0; i < length; i++) {\\n list[i] = _pairsStorage[i + 1];\\n }\\n\\n return list;\\n }\\n\\n /**\\n * returns the given tokens sorted by address value, smaller first\\n */\\n function _sortTokens(Token token0, Token token1) private pure returns (Token[2] memory) {\\n return Token.unwrap(token0) < Token.unwrap(token1) ? [token0, token1] : [token1, token0];\\n }\\n}\\n\",\"keccak256\":\"0xf93c805727414083085098262481ac9def2bdeafcb71934234b0b92cc6320551\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/Strategies.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSetUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Pair } from \\\"./Pairs.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { PPM_RESOLUTION } from \\\"../utility/Constants.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev:\\n *\\n * a strategy consists of two orders:\\n * - order 0 sells `y0` units of token 0 at a marginal rate `M0` ranging between `L0` and `H0`\\n * - order 1 sells `y1` units of token 1 at a marginal rate `M1` ranging between `L1` and `H1`\\n *\\n * rate symbols:\\n * - `L0` indicates the lowest value of one wei of token 0 in units of token 1\\n * - `H0` indicates the highest value of one wei of token 0 in units of token 1\\n * - `M0` indicates the marginal value of one wei of token 0 in units of token 1\\n * - `L1` indicates the lowest value of one wei of token 1 in units of token 0\\n * - `H1` indicates the highest value of one wei of token 1 in units of token 0\\n * - `M1` indicates the marginal value of one wei of token 1 in units of token 0\\n *\\n * the term \\\"one wei\\\" serves here as a simplification of \\\"an amount tending to zero\\\",\\n * hence the rate values above are all theoretical.\\n * moreover, since trade calculation is based on the square roots of the rates,\\n * an order doesn't actually hold the rate values, but a modified version of them.\\n * for each rate `r`, the order maintains:\\n * - mantissa: the value of the 48 most significant bits of `floor(sqrt(r) * 2 ^ 48)`\\n * - exponent: the number of the remaining (least significant) bits, limited up to 48\\n * this allows for rates between ~12.6e-28 and ~7.92e+28, at an average resolution of ~2.81e+14.\\n * it also ensures that every rate value `r` is supported if and only if `1 / r` is supported.\\n * however, it also yields a certain degree of accuracy loss as soon as the order is created.\\n *\\n * encoding / decoding scheme:\\n * - `b(x) = bit-length of x`\\n * - `c(x) = max(b(x) - 48, 0)`\\n * - `f(x) = floor(sqrt(x) * (1 << 48))`\\n * - `g(x) = f(x) >> c(f(x)) << c(f(x))`\\n * - `e(x) = (x >> c(x)) | (c(x) << 48)`\\n * - `d(x) = (x & ((1 << 48) - 1)) << (x >> 48)`\\n *\\n * let the following denote:\\n * - `L = g(lowest rate)`\\n * - `H = g(highest rate)`\\n * - `M = g(marginal rate)`\\n *\\n * then the order maintains:\\n * - `y = current liquidity`\\n * - `z = current liquidity * (H - L) / (M - L)`\\n * - `A = e(H - L)`\\n * - `B = e(L)`\\n *\\n * and the order reflects:\\n * - `L = d(B)`\\n * - `H = d(B + A)`\\n * - `M = d(B + A * y / z)`\\n *\\n * upon trading on a given order in a given strategy:\\n * - the value of `y` in the given order decreases\\n * - the value of `y` in the other order increases\\n * - the value of `z` in the other order may increase\\n * - the values of all other parameters remain unchanged\\n *\\n * given a source amount `x`, the expected target amount is:\\n * - theoretical formula: `M ^ 2 * x * y / (M * (M - L) * x + y)`\\n * - implemented formula: `x * (A * y + B * z) ^ 2 / (A * x * (A * y + B * z) + z ^ 2)`\\n *\\n * given a target amount `x`, the required source amount is:\\n * - theoretical formula: `x * y / (M * (L - M) * x + M ^ 2 * y)`\\n * - implemented formula: `x * z ^ 2 / ((A * y + B * z) * (A * y + B * z - A * x))`\\n *\\n * fee scheme:\\n * +-------------------+---------------------------------+---------------------------------+\\n * | trade function | trader transfers to contract | contract transfers to trader |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | bySourceAmount(x) | trader transfers to contract: x | p = expectedTargetAmount(x) |\\n * | | | q = p * (100 - fee%) / 100 |\\n * | | | contract transfers to trader: q |\\n * | | | contract retains as fee: p - q |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | byTargetAmount(x) | p = requiredSourceAmount(x) | contract transfers to trader: x |\\n * | | q = p * 100 / (100 - fee%) | |\\n * | | trader transfers to contract: q | |\\n * | | contract retains as fee: q - p | |\\n * +-------------------+---------------------------------+---------------------------------+\\n */\\n\\n// solhint-disable var-name-mixedcase\\nstruct Order {\\n uint128 y;\\n uint128 z;\\n uint64 A;\\n uint64 B;\\n}\\n// solhint-enable var-name-mixedcase\\n\\nstruct TradeTokens {\\n Token source;\\n Token target;\\n}\\n\\nstruct Strategy {\\n uint256 id;\\n address owner;\\n Token[2] tokens;\\n Order[2] orders;\\n}\\n\\nstruct TradeAction {\\n uint256 strategyId;\\n uint128 amount;\\n}\\n\\n// strategy update reasons\\nuint8 constant STRATEGY_UPDATE_REASON_EDIT = 0;\\nuint8 constant STRATEGY_UPDATE_REASON_TRADE = 1;\\n\\nabstract contract Strategies is Initializable {\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\\n using Address for address payable;\\n using SafeCast for uint256;\\n\\n error NativeAmountMismatch();\\n error BalanceMismatch();\\n error GreaterThanMaxInput();\\n error LowerThanMinReturn();\\n error InsufficientCapacity();\\n error InsufficientLiquidity();\\n error InvalidRate();\\n error InvalidTradeActionStrategyId();\\n error InvalidTradeActionAmount();\\n error OrderDisabled();\\n error OutDated();\\n\\n struct SourceAndTargetAmounts {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct TradeParams {\\n address trader;\\n TradeTokens tokens;\\n bool byTargetAmount;\\n uint128 constraint;\\n uint256 txValue;\\n Pair pair;\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n uint256 private constant ONE = 1 << 48;\\n\\n uint256 private constant ORDERS_INVERTED_FLAG = 1 << 255;\\n\\n uint32 private constant DEFAULT_TRADING_FEE_PPM = 4000; // 0.4%\\n\\n // total number of strategies\\n uint128 private _strategyCounter;\\n\\n // the global trading fee (in units of PPM)\\n uint32 internal _tradingFeePPM;\\n\\n // mapping between a strategy to its packed orders\\n mapping(uint256 => uint256[3]) private _packedOrdersByStrategyId;\\n\\n // mapping between a pair id to its strategies ids\\n mapping(uint128 => EnumerableSetUpgradeable.UintSet) private _strategyIdsByPairIdStorage;\\n\\n // accumulated fees per token\\n mapping(Token => uint256) internal _accumulatedFees;\\n\\n // mapping between a pair id to its custom trading fee (in units of PPM)\\n mapping(uint128 pairId => uint32 fee) internal _customTradingFeePPM;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n * @dev triggered when the network fee is updated\\n */\\n event TradingFeePPMUpdated(uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when the custom trading fee for a given pair is updated\\n */\\n event PairTradingFeePPMUpdated(Token indexed token0, Token indexed token1, uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when a strategy is created\\n */\\n event StrategyCreated(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is deleted\\n */\\n event StrategyDeleted(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is updated\\n */\\n event StrategyUpdated(\\n uint256 indexed id,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1,\\n uint8 reason\\n );\\n\\n /**\\n * @dev triggered when tokens are traded\\n */\\n event TokensTraded(\\n address indexed trader,\\n Token indexed sourceToken,\\n Token indexed targetToken,\\n uint256 sourceAmount,\\n uint256 targetAmount,\\n uint128 tradingFeeAmount,\\n bool byTargetAmount\\n );\\n\\n /**\\n * @dev triggered when fees are withdrawn\\n */\\n event FeesWithdrawn(Token indexed token, address indexed recipient, uint256 indexed amount, address sender);\\n\\n // solhint-disable func-name-mixedcase\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Strategies_init() internal onlyInitializing {\\n __Strategies_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Strategies_init_unchained() internal onlyInitializing {\\n _setTradingFeePPM(DEFAULT_TRADING_FEE_PPM);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev creates a new strategy\\n */\\n function _createStrategy(\\n IVoucher voucher,\\n Token[2] memory tokens,\\n Order[2] calldata orders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal returns (uint256) {\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(tokens[0], owner, orders[0].y, value, true);\\n _validateDepositAndRefundExcessNativeToken(tokens[1], owner, orders[1].y, value, true);\\n\\n // store id\\n uint128 counter = _strategyCounter + 1;\\n _strategyCounter = counter;\\n uint256 id = _strategyId(pair.id, counter);\\n _strategyIdsByPairIdStorage[pair.id].add(id);\\n\\n // store orders\\n bool ordersInverted = tokens[0] == pair.tokens[1];\\n _packedOrdersByStrategyId[id] = _packOrders(orders, ordersInverted);\\n\\n // mint voucher\\n voucher.mint(owner, id);\\n\\n // emit event\\n emit StrategyCreated({\\n id: id,\\n owner: owner,\\n token0: tokens[0],\\n token1: tokens[1],\\n order0: orders[0],\\n order1: orders[1]\\n });\\n\\n return id;\\n }\\n\\n /**\\n * @dev updates an existing strategy\\n */\\n function _updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal {\\n // prepare storage variable\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // revert if the strategy mutated since this tx was sent\\n if (!_equalStrategyOrders(currentOrders, orders)) {\\n revert OutDated();\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(newOrders, ordersInverted);\\n if (packedOrdersMemory[0] != newPackedOrders[0]) {\\n packedOrders[0] = newPackedOrders[0];\\n }\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // deposit and withdraw\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n Token token = sortedTokens[i];\\n if (newOrders[i].y < orders[i].y) {\\n // liquidity decreased - withdraw the difference\\n uint128 delta = orders[i].y - newOrders[i].y;\\n _withdrawFunds(token, payable(owner), delta);\\n } else if (newOrders[i].y > orders[i].y) {\\n // liquidity increased - deposit the difference\\n uint128 delta = newOrders[i].y - orders[i].y;\\n _validateDepositAndRefundExcessNativeToken(token, owner, delta, value, true);\\n }\\n\\n // refund native token when there's no deposit in the order\\n // note that deposit handles refunds internally\\n if (value > 0 && token.isNative() && newOrders[i].y <= orders[i].y) {\\n payable(address(owner)).sendValue(value);\\n }\\n }\\n\\n // emit event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: sortedTokens[0],\\n token1: sortedTokens[1],\\n order0: newOrders[0],\\n order1: newOrders[1],\\n reason: STRATEGY_UPDATE_REASON_EDIT\\n });\\n }\\n\\n /**\\n * @dev deletes a strategy\\n */\\n function _deleteStrategy(uint256 strategyId, IVoucher voucher, Pair memory pair) internal {\\n Strategy memory strategy = _strategy(strategyId, voucher, pair);\\n\\n // burn the voucher nft token\\n voucher.burn(strategy.id);\\n\\n // clear storage\\n delete _packedOrdersByStrategyId[strategy.id];\\n _strategyIdsByPairIdStorage[pair.id].remove(strategy.id);\\n\\n // withdraw funds\\n _withdrawFunds(strategy.tokens[0], payable(strategy.owner), strategy.orders[0].y);\\n _withdrawFunds(strategy.tokens[1], payable(strategy.owner), strategy.orders[1].y);\\n\\n // emit event\\n emit StrategyDeleted({\\n id: strategy.id,\\n owner: strategy.owner,\\n token0: strategy.tokens[0],\\n token1: strategy.tokens[1],\\n order0: strategy.orders[0],\\n order1: strategy.orders[1]\\n });\\n }\\n\\n /**\\n * @dev perform trade, update affected strategies\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function _trade(TradeAction[] calldata tradeActions, TradeParams memory params) internal {\\n bool isTargetToken0 = params.tokens.target == params.pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(params.pair.id, strategyId, amount);\\n\\n (Order memory targetOrder, Order memory sourceOrder) = isTargetToken0 == ordersInverted\\n ? (orders[1], orders[0])\\n : (orders[0], orders[1]);\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n params.byTargetAmount\\n );\\n\\n // handled specifically for a custom error message\\n if (targetOrder.y < targetAmount) {\\n revert InsufficientLiquidity();\\n }\\n\\n // update the orders with the new values\\n // safe since it's checked above\\n unchecked {\\n targetOrder.y -= targetAmount;\\n }\\n\\n sourceOrder.y += sourceAmount;\\n if (sourceOrder.z < sourceOrder.y) {\\n sourceOrder.z = sourceOrder.y;\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(orders, ordersInverted);\\n\\n // both y values are in slot 0, so it has definitely changed\\n packedOrders[0] = newPackedOrders[0];\\n\\n // one of the z values is in slot 1, so it has possibly changed\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n\\n // the other z value has possibly changed only if the first one hasn't\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // emit update event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: params.pair.tokens[ordersInverted ? 1 : 0],\\n token1: params.pair.tokens[ordersInverted ? 0 : 1],\\n order0: orders[0],\\n order1: orders[1],\\n reason: STRATEGY_UPDATE_REASON_TRADE\\n });\\n\\n params.sourceAmount += sourceAmount;\\n params.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n uint128 tradingFeeAmount;\\n if (params.byTargetAmount) {\\n uint128 amountIncludingFee = _addFee(params.sourceAmount, params.pair.id);\\n tradingFeeAmount = amountIncludingFee - params.sourceAmount;\\n params.sourceAmount = amountIncludingFee;\\n if (params.sourceAmount > params.constraint) {\\n revert GreaterThanMaxInput();\\n }\\n _accumulatedFees[params.tokens.source] += tradingFeeAmount;\\n } else {\\n uint128 amountExcludingFee = _subtractFee(params.targetAmount, params.pair.id);\\n tradingFeeAmount = params.targetAmount - amountExcludingFee;\\n params.targetAmount = amountExcludingFee;\\n if (params.targetAmount < params.constraint) {\\n revert LowerThanMinReturn();\\n }\\n _accumulatedFees[params.tokens.target] += tradingFeeAmount;\\n }\\n\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(\\n params.tokens.source,\\n params.trader,\\n params.sourceAmount,\\n params.txValue,\\n false\\n );\\n _withdrawFunds(params.tokens.target, payable(params.trader), params.targetAmount);\\n\\n // tokens traded successfully, emit event\\n emit TokensTraded({\\n trader: params.trader,\\n sourceToken: params.tokens.source,\\n targetToken: params.tokens.target,\\n sourceAmount: params.sourceAmount,\\n targetAmount: params.targetAmount,\\n tradingFeeAmount: tradingFeeAmount,\\n byTargetAmount: params.byTargetAmount\\n });\\n }\\n\\n /**\\n * @dev calculates the required amount plus fee\\n */\\n function _addFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // divide the input amount by `1 - fee`\\n return MathEx.mulDivC(amount, PPM_RESOLUTION, PPM_RESOLUTION - tradingFeePPM).toUint128();\\n }\\n\\n /**\\n * @dev calculates the expected amount minus fee\\n */\\n function _subtractFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // multiply the input amount by `1 - fee`\\n return MathEx.mulDivF(amount, PPM_RESOLUTION - tradingFeePPM, PPM_RESOLUTION).toUint128();\\n }\\n\\n /**\\n * @dev get the custom trading fee ppm for a given pair (returns default trading fee if not set for pair)\\n */\\n function _getPairTradingFeePPM(uint128 pairId) internal view returns (uint32) {\\n uint32 customTradingFeePPM = _customTradingFeePPM[pairId];\\n return customTradingFeePPM == 0 ? _tradingFeePPM : customTradingFeePPM;\\n }\\n\\n /**\\n * @dev calculates and returns the total source and target amounts of a trade, including fees\\n */\\n function _tradeSourceAndTargetAmounts(\\n TradeTokens memory tokens,\\n TradeAction[] calldata tradeActions,\\n Pair memory pair,\\n bool byTargetAmount\\n ) internal view returns (SourceAndTargetAmounts memory totals) {\\n bool isTargetToken0 = tokens.target == pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[strategyId];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(pair.id, strategyId, amount);\\n\\n Order memory targetOrder = isTargetToken0 == ordersInverted ? orders[1] : orders[0];\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n byTargetAmount\\n );\\n\\n // update totals\\n totals.sourceAmount += sourceAmount;\\n totals.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n if (byTargetAmount) {\\n totals.sourceAmount = _addFee(totals.sourceAmount, pair.id);\\n } else {\\n totals.targetAmount = _subtractFee(totals.targetAmount, pair.id);\\n }\\n }\\n\\n /**\\n * @dev returns stored strategies of a pair\\n */\\n function _strategiesByPair(\\n Pair memory pair,\\n uint256 startIndex,\\n uint256 endIndex,\\n IVoucher voucher\\n ) internal view returns (Strategy[] memory) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n uint256 allLength = strategyIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last value possible\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n Strategy[] memory result = new Strategy[](resultLength);\\n for (uint256 i = 0; i < resultLength; i = uncheckedInc(i)) {\\n uint256 strategyId = strategyIds.at(startIndex + i);\\n result[i] = _strategy(strategyId, voucher, pair);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev returns the count of stored strategies of a pair\\n */\\n function _strategiesByPairCount(Pair memory pair) internal view returns (uint256) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n return strategyIds.length();\\n }\\n\\n /**\\n @dev returns a strategy object matching the provided id.\\n */\\n function _strategy(uint256 id, IVoucher voucher, Pair memory pair) internal view returns (Strategy memory) {\\n // fetch data\\n address _owner = voucher.ownerOf(id);\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[id];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // handle sorting\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n\\n return Strategy({ id: id, owner: _owner, tokens: sortedTokens, orders: orders });\\n }\\n\\n /**\\n * @dev validates deposit amounts, refunds excess native tokens sent\\n */\\n function _validateDepositAndRefundExcessNativeToken(\\n Token token,\\n address owner,\\n uint256 depositAmount,\\n uint256 txValue,\\n bool validateDepositAmount\\n ) private {\\n if (token.isNative()) {\\n if (txValue < depositAmount) {\\n revert NativeAmountMismatch();\\n }\\n\\n // refund the owner for the remaining native token amount\\n if (txValue > depositAmount) {\\n payable(address(owner)).sendValue(txValue - depositAmount);\\n }\\n } else if (depositAmount > 0) {\\n if (validateDepositAmount) {\\n uint256 prevBalance = token.balanceOf(address(this));\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n uint256 newBalance = token.balanceOf(address(this));\\n if (newBalance - prevBalance != depositAmount) {\\n revert BalanceMismatch();\\n }\\n } else {\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n }\\n }\\n }\\n\\n function _validateTradeParams(uint128 pairId, uint256 strategyId, uint128 tradeAmount) private pure {\\n // make sure the strategy id matches the pair id\\n if (_pairIdByStrategyId(strategyId) != pairId) {\\n revert InvalidTradeActionStrategyId();\\n }\\n\\n // make sure the trade amount is nonzero\\n if (tradeAmount == 0) {\\n revert InvalidTradeActionAmount();\\n }\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n */\\n function _setTradingFeePPM(uint32 newTradingFeePPM) internal {\\n uint32 prevTradingFeePPM = _tradingFeePPM;\\n if (prevTradingFeePPM == newTradingFeePPM) {\\n return;\\n }\\n\\n _tradingFeePPM = newTradingFeePPM;\\n\\n emit TradingFeePPMUpdated({ prevFeePPM: prevTradingFeePPM, newFeePPM: newTradingFeePPM });\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n */\\n function _setPairTradingFeePPM(Pair memory pair, uint32 newCustomTradingFeePPM) internal {\\n uint32 prevCustomTradingFeePPM = _customTradingFeePPM[pair.id];\\n if (prevCustomTradingFeePPM == newCustomTradingFeePPM) {\\n return;\\n }\\n\\n _customTradingFeePPM[pair.id] = newCustomTradingFeePPM;\\n\\n emit PairTradingFeePPMUpdated({\\n token0: pair.tokens[0],\\n token1: pair.tokens[1],\\n prevFeePPM: prevCustomTradingFeePPM,\\n newFeePPM: newCustomTradingFeePPM\\n });\\n }\\n\\n /**\\n * returns true if the provided orders are equal, false otherwise\\n */\\n function _equalStrategyOrders(Order[2] memory orders0, Order[2] memory orders1) internal pure returns (bool) {\\n uint256 i;\\n for (i = 0; i < 2; i = uncheckedInc(i)) {\\n if (\\n orders0[i].y != orders1[i].y ||\\n orders0[i].z != orders1[i].z ||\\n orders0[i].A != orders1[i].A ||\\n orders0[i].B != orders1[i].B\\n ) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @dev returns:\\n *\\n * x * (A * y + B * z) ^ 2\\n * ---------------------------------\\n * A * x * (A * y + B * z) + z ^ 2\\n *\\n */\\n function _calculateTradeTargetAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivF(x, B * B, ONE * ONE);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 * x;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp3, A);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivC(temp3, A, factor);\\n\\n (bool safe, uint256 sum) = SafeMath.tryAdd(temp4, temp5);\\n if (safe) {\\n return MathEx.mulDivF(temp2, temp3 / factor, sum);\\n }\\n return temp2 / (A + MathEx.mulDivC(temp1, temp1, temp3));\\n }\\n\\n /**\\n * @dev returns:\\n *\\n * x * z ^ 2\\n * -------------------------------------------\\n * (A * y + B * z) * (A * y + B * z - A * x)\\n *\\n */\\n function _calculateTradeSourceAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivC(x, ONE * ONE, B * B);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 - x * A;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp2, temp3);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivF(temp2, temp3, factor);\\n return MathEx.mulDivC(x, temp4, temp5);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev pack 2 orders into a 3 slot uint256 data structure\\n */\\n function _packOrders(Order[2] memory orders, bool ordersInverted) private pure returns (uint256[3] memory values) {\\n values = [\\n uint256((uint256(orders[0].y) << 0) | (uint256(orders[1].y) << 128)),\\n uint256((uint256(orders[0].z) << 0) | (uint256(orders[0].A) << 128) | (uint256(orders[0].B) << 192)),\\n uint256(\\n (uint256(orders[1].z) << 0) |\\n (uint256(orders[1].A) << 128) |\\n (uint256(orders[1].B) << 192) |\\n (ordersInverted ? ORDERS_INVERTED_FLAG : 0)\\n )\\n ];\\n }\\n\\n /**\\n * @dev unpack 2 stored orders into an array of Order types\\n */\\n function _unpackOrders(\\n uint256[3] memory values\\n ) private pure returns (Order[2] memory orders, bool ordersInverted) {\\n orders = [\\n Order({\\n y: uint128(values[0] >> 0),\\n z: uint128(values[1] >> 0),\\n A: uint64(values[1] >> 128),\\n B: uint64(values[1] >> 192)\\n }),\\n Order({\\n y: uint128(values[0] >> 128),\\n z: uint128(values[2] >> 0),\\n A: uint64(values[2] >> 128),\\n B: uint64((values[2] << 1) >> 193)\\n })\\n ];\\n ordersInverted = values[2] >= ORDERS_INVERTED_FLAG;\\n }\\n\\n /**\\n * @dev expand a given rate\\n */\\n function _expandRate(uint256 rate) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (rate % ONE) << (rate / ONE);\\n }\\n }\\n\\n /**\\n * @dev validates a given rate\\n */\\n function _validRate(uint256 rate) internal pure returns (bool) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (ONE >> (rate / ONE)) > 0;\\n }\\n }\\n\\n /**\\n * @dev returns the source and target amounts of a single trade action\\n */\\n function _singleTradeActionSourceAndTargetAmounts(\\n Order memory order,\\n uint128 amount,\\n bool byTargetAmount\\n ) internal pure returns (uint128 sourceAmount, uint128 targetAmount) {\\n uint256 y = uint256(order.y);\\n uint256 z = uint256(order.z);\\n uint256 a = _expandRate(uint256(order.A));\\n uint256 b = _expandRate(uint256(order.B));\\n if (byTargetAmount) {\\n sourceAmount = _calculateTradeSourceAmount(amount, y, z, a, b).toUint128();\\n targetAmount = amount;\\n } else {\\n sourceAmount = amount;\\n targetAmount = _calculateTradeTargetAmount(amount, y, z, a, b).toUint128();\\n }\\n }\\n\\n /**\\n * revert if any of the orders is invalid\\n */\\n function _validateOrders(Order[2] calldata orders) internal pure {\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n if (orders[i].z < orders[i].y) {\\n revert InsufficientCapacity();\\n }\\n if (!_validRate(orders[i].A)) {\\n revert InvalidRate();\\n }\\n if (!_validRate(orders[i].B)) {\\n revert InvalidRate();\\n }\\n }\\n }\\n\\n /**\\n * returns the strategyId for a given pairId and a given strategyIndex\\n */\\n function _strategyId(uint128 pairId, uint128 strategyIndex) internal pure returns (uint256) {\\n return (uint256(pairId) << 128) | strategyIndex;\\n }\\n\\n /**\\n * returns the pairId associated with a given strategyId\\n */\\n function _pairIdByStrategyId(uint256 strategyId) internal pure returns (uint128) {\\n return uint128(strategyId >> 128);\\n }\\n\\n function _withdrawFees(address sender, uint256 amount, Token token, address recipient) internal returns (uint256) {\\n uint256 accumulatedAmount = _accumulatedFees[token];\\n if (accumulatedAmount == 0) {\\n return 0;\\n }\\n if (amount > accumulatedAmount) {\\n amount = accumulatedAmount;\\n }\\n\\n _accumulatedFees[token] = accumulatedAmount - amount;\\n _withdrawFunds(token, payable(recipient), amount);\\n emit FeesWithdrawn(token, recipient, amount, sender);\\n return amount;\\n }\\n\\n /**\\n * returns tokens sorted accordingly to a strategy orders inversion\\n */\\n function _sortStrategyTokens(Pair memory pair, bool ordersInverted) private pure returns (Token[2] memory) {\\n return ordersInverted ? [pair.tokens[1], pair.tokens[0]] : pair.tokens;\\n }\\n\\n /**\\n * sends erc20 or native token to the provided target\\n */\\n function _withdrawFunds(Token token, address payable target, uint256 amount) private {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (token.isNative()) {\\n // using a regular transfer here would revert due to exceeding the 2300 gas limit which is why we're using\\n // call instead (via sendValue), which the 2300 gas limit does not apply for\\n target.sendValue(amount);\\n } else {\\n token.safeTransfer(target, amount);\\n }\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xddfe729cc073256f10ce38329e8155108692bafa508326f959ff06e049849f44\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/interfaces/ICarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Pair } from \\\"../Pairs.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\nimport { Strategy, TradeAction, Order } from \\\"../Strategies.sol\\\";\\n\\n/**\\n * @dev Carbon Controller interface\\n */\\ninterface ICarbonController is IUpgradeable {\\n /**\\n * @dev returns the type of the controller\\n */\\n function controllerType() external pure returns (uint16);\\n\\n /**\\n * @dev returns the trading fee (in units of PPM)\\n */\\n function tradingFeePPM() external view returns (uint32);\\n\\n /**\\n * @dev returns the trading fee for a given pair (in units of PPM)\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32);\\n\\n /**\\n * @dev creates a new pair of provided token0 and token1\\n */\\n function createPair(Token token0, Token token1) external returns (Pair memory);\\n\\n /**\\n * @dev returns a pair's metadata matching the provided token0 and token1\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory);\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function pairs() external view returns (Token[2][] memory);\\n\\n // solhint-disable var-name-mixedcase\\n /**\\n * @dev creates a new strategy, returns the strategy's id\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with assigned liquidity in the order, if any\\n */\\n function createStrategy(Token token0, Token token1, Order[2] calldata orders) external payable returns (uint256);\\n\\n /**\\n * @dev updates an existing strategy\\n *\\n * notes:\\n * - currentOrders should reflect the orders values at the time of sending the tx\\n * this prevents cases in which the strategy was updated due to a trade between\\n * the time the transaction was sent and the time it was mined, thus, giving more\\n * control to the strategy owner.\\n * - reduced liquidity is refunded to the owner\\n * - increased liquidity is deposited\\n * - excess native token is returned to the sender if any\\n * - the sorting of orders is expected to equal the sorting upon creation\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with increased liquidity, if any\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable;\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev deletes a strategy matching the provided id\\n *\\n * notes:\\n *\\n * - 100% of liquidity is withdrawn and sent to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the owner of the NFT voucher\\n */\\n function deleteStrategy(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a strategy matching the provided id,\\n * note tokens and orders are returned sorted as provided upon creation\\n */\\n function strategy(uint256 id) external view returns (Strategy memory);\\n\\n /**\\n * @dev returns strategies belonging to a specific pair\\n * note that for the full list of strategies pass 0 to both startIndex and endIndex\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory);\\n\\n /**\\n * @dev returns the count of strategies belonging to a specific pair\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256);\\n\\n /**\\n * @dev performs a trade by specifying a fixed source amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev performs a trade by specifying a fixed target amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev returns the source amount required when trading by target amount\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the target amount expected when trading by source amount\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the amount of fees accumulated for the specified token\\n */\\n function accumulatedFees(Token token) external view returns (uint256);\\n\\n /**\\n * @dev transfers the accumulated fees to the specified recipient\\n *\\n * notes:\\n * `amount` is capped to the available amount\\n * returns the amount withdrawn\\n */\\n function withdrawFees(Token token, uint256 amount, address recipient) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xf495e13cd389a72edea6e37db3ae5b419718eea5efc2cfb48259747c2399ff15\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/token/Token.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\n/**\\n * @dev This type implements ERC20 and SafeERC20 utilities for both the native token and for ERC20 tokens\\n */\\ntype Token is address;\\nusing SafeERC20 for IERC20;\\nusing Address for address payable;\\n\\n// the address that represents the native token reserve\\naddress constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// the symbol that represents the native token\\nstring constant NATIVE_TOKEN_SYMBOL = \\\"ETH\\\";\\n\\n// the decimals for the native token\\nuint8 constant NATIVE_TOKEN_DECIMALS = 18;\\n\\n// the token representing the native token\\nToken constant NATIVE_TOKEN = Token.wrap(NATIVE_TOKEN_ADDRESS);\\n\\nusing {\\n equal as ==,\\n notEqual as !=,\\n isNative,\\n symbol,\\n decimals,\\n balanceOf,\\n allowance,\\n safeTransfer,\\n safeTransferFrom,\\n safeApprove,\\n safeIncreaseAllowance,\\n unsafeTransfer\\n} for Token global;\\n\\n/* solhint-disable func-visibility */\\n\\nfunction equal(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) == Token.unwrap(b);\\n}\\n\\nfunction notEqual(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) != Token.unwrap(b);\\n}\\n\\n/**\\n * @dev returns whether the provided token represents an ERC20 or the native token reserve\\n */\\nfunction isNative(Token token) pure returns (bool) {\\n return token == NATIVE_TOKEN;\\n}\\n\\n/**\\n * @dev returns the symbol of the native token/ERC20 token\\n */\\nfunction symbol(Token token) view returns (string memory) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_SYMBOL;\\n }\\n return toERC20(token).symbol();\\n}\\n\\n/**\\n * @dev returns the decimals of the native token/ERC20 token\\n */\\nfunction decimals(Token token) view returns (uint8) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_DECIMALS;\\n }\\n return toERC20(token).decimals();\\n}\\n\\n/**\\n * @dev returns the balance of the native token/ERC20 token\\n */\\nfunction balanceOf(Token token, address account) view returns (uint256) {\\n if (isNative(token)) {\\n return account.balance;\\n }\\n return toIERC20(token).balanceOf(account);\\n}\\n\\n/**\\n * @dev returns the allowance of an `owner` to a `spender`\\n */\\nfunction allowance(Token token, address owner, address spender) view returns (uint256) {\\n if (isNative(token)) {\\n return 0;\\n }\\n return toIERC20(token).allowance(owner, spender);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n */\\nfunction safeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n if (isNative(token)) {\\n payable(to).transfer(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token from a specific holder using the allowance mechanism\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeTransferFrom(Token token, address from, address to, uint256 amount) {\\n if (amount == 0 || isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeTransferFrom(from, to, amount);\\n}\\n\\n/**\\n * @dev approves a specific amount of the native token/ERC20 token from a specific holder\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeApprove(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeApprove(spender, amount);\\n}\\n\\n/**\\n * @dev atomically increases the allowance granted to `spender` by the caller.\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeIncreaseAllowance(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeIncreaseAllowance(spender, amount);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n * @dev forwards all available gas if sending native token\\n */\\nfunction unsafeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (isNative(token)) {\\n payable(to).sendValue(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev utility function that converts a token to an IERC20\\n */\\nfunction toIERC20(Token token) pure returns (IERC20) {\\n return IERC20(Token.unwrap(token));\\n}\\n\\n/**\\n * @dev utility function that converts a token to an ERC20\\n */\\nfunction toERC20(Token token) pure returns (ERC20) {\\n return ERC20(Token.unwrap(token));\\n}\\n\\n/* solhint-disable func-visibility */\\n\",\"keccak256\":\"0x410b7ec2315aa0631a12c7d37f5ade829d4f1d326834cde1004ddab33ed5049e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x6cbf2c0e48b5377fe5fea47278256856368612efd7e29b17c716f1611b64d0f3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/ExpDecayMath.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Fraction } from \\\"./Fraction.sol\\\";\\nimport { MathEx } from \\\"./MathEx.sol\\\";\\n\\n/**\\n * @dev This library supports the calculation of exponential price decay\\n */\\nlibrary ExpDecayMath {\\n /**\\n * @dev returns the amount required for a token after a given time period since trading has been enabled\\n *\\n * the returned value is calculated as `amount / 2 ^ (timeElapsed / halfLife)`\\n * note that the input value to this function is limited by `timeElapsed / halfLife < 129`\\n */\\n function calcExpDecay(uint256 amount, uint32 timeElapsed, uint32 halfLife) internal pure returns (uint256) {\\n uint256 integerPart = timeElapsed / halfLife;\\n uint256 fractionPart = timeElapsed % halfLife;\\n Fraction memory input = Fraction({ n: fractionPart, d: halfLife });\\n Fraction memory output = MathEx.exp2(input);\\n return MathEx.mulDivF(amount, output.d, output.n * 2 ** integerPart);\\n }\\n}\\n\",\"keccak256\":\"0x20ff0b389d0eb2e720bb7006144650a7632ab76be3555ba68380930b37c1b41f\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Fraction.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nstruct Fraction {\\n uint256 n;\\n uint256 d;\\n}\\n\",\"keccak256\":\"0x84c801ef901e7fd30e99637377b29dfa28c6c1fa140adb5c872fddd8b82fd358\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/MathEx.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Fraction } from \\\"./Fraction.sol\\\";\\n\\nuint256 constant ONE = 0x80000000000000000000000000000000;\\nuint256 constant LN2 = 0x58b90bfbe8e7bcd5e4f1d9cc01f97b57;\\n\\n/**\\n * @dev this library provides a set of complex math operations\\n */\\nlibrary MathEx {\\n error Overflow();\\n\\n /**\\n * @dev returns the largest integer smaller than or equal to `x * y / z`\\n */\\n function mulDivF(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n (uint256 xyhi, uint256 xylo) = _mul512(x, y);\\n\\n // if `x * y < 2 ^ 256`\\n if (xyhi == 0) {\\n return xylo / z;\\n }\\n\\n // assert `x * y / z < 2 ^ 256`\\n if (xyhi >= z) {\\n revert Overflow();\\n }\\n\\n uint256 m = _mulMod(x, y, z); // `m = x * y % z`\\n (uint256 nhi, uint256 nlo) = _sub512(xyhi, xylo, m); // `n = x * y - m` hence `n / z = floor(x * y / z)`\\n\\n // if `n < 2 ^ 256`\\n if (nhi == 0) {\\n return nlo / z;\\n }\\n\\n uint256 p = _unsafeSub(0, z) & z; // `p` is the largest power of 2 which `z` is divisible by\\n uint256 q = _div512(nhi, nlo, p); // `n` is divisible by `p` because `n` is divisible by `z` and `z` is divisible by `p`\\n uint256 r = _inv256(z / p); // `z / p = 1 mod 2` hence `inverse(z / p) = 1 mod 2 ^ 256`\\n return _unsafeMul(q, r); // `q * r = (n / p) * inverse(z / p) = n / z`\\n }\\n }\\n\\n /**\\n * @dev returns the smallest integer larger than or equal to `x * y / z`\\n */\\n function mulDivC(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n uint256 w = mulDivF(x, y, z);\\n if (_mulMod(x, y, z) > 0) {\\n if (w >= type(uint256).max) {\\n revert Overflow();\\n }\\n unchecked {\\n // safe because `w < type(uint256).max`\\n return w + 1;\\n }\\n }\\n return w;\\n }\\n\\n /**\\n * @dev returns the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n */\\n function minFactor(uint256 x, uint256 y) internal pure returns (uint256) {\\n (uint256 hi, uint256 lo) = _mul512(x, y);\\n unchecked {\\n // safe because:\\n // - if `x < 2 ^ 256 - 1` or `y < 2 ^ 256 - 1`\\n // then `hi < 2 ^ 256 - 2`\\n // hence neither `hi + 1` nor `hi + 2` overflows\\n // - if `x = 2 ^ 256 - 1` and `y = 2 ^ 256 - 1`\\n // then `hi = 2 ^ 256 - 2 = ~lo`\\n // hence `hi + 1`, which does not overflow, is computed\\n return hi > ~lo ? hi + 2 : hi + 1;\\n }\\n\\n /* reasoning:\\n |\\n | general:\\n | - find the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n | - the value of `x * y` is represented via `2 ^ 256 * hi + lo`\\n | - the expression `~lo` is equivalent to `2 ^ 256 - 1 - lo`\\n | \\n | symbols:\\n | - let `H` denote `hi`\\n | - let `L` denote `lo`\\n | - let `N` denote `2 ^ 256 - 1`\\n | \\n | inference:\\n | `x * y / z <= 2 ^ 256 - 1` <-->\\n | `x * y / (2 ^ 256 - 1) <= z` <-->\\n | `((N + 1) * H + L) / N <= z` <-->\\n | `(N * H + H + L) / N <= z` <-->\\n | `H + (H + L) / N <= z`\\n | \\n | inference:\\n | `0 <= H <= N && 0 <= L <= N` <-->\\n | `0 <= H + L <= N + N` <-->\\n | `0 <= H + L <= N * 2` <-->\\n | `0 <= (H + L) / N <= 2`\\n | \\n | inference:\\n | - `0 = (H + L) / N` --> `H + L = 0` --> `x * y = 0` --> `z = 1 = H + 1`\\n | - `0 < (H + L) / N <= 1` --> `H + (H + L) / N <= H + 1` --> `z = H + 1`\\n | - `1 < (H + L) / N <= 2` --> `H + (H + L) / N <= H + 2` --> `z = H + 2`\\n | \\n | implementation:\\n | - if `hi > ~lo`:\\n | `~L < H <= N` <-->\\n | `N - L < H <= N` <-->\\n | `N < H + L <= N + L` <-->\\n | `1 < (H + L) / N <= 2` <-->\\n | `H + 1 < H + (H + L) / N <= H + 2` <-->\\n | `z = H + 2`\\n | - if `hi <= ~lo`:\\n | `H <= ~L` <-->\\n | `H <= N - L` <-->\\n | `H + L <= N` <-->\\n | `(H + L) / N <= 1` <-->\\n | `H + (H + L) / N <= H + 1` <-->\\n | `z = H + 1`\\n |\\n */\\n }\\n\\n /**\\n * @dev returns `2 ^ f` by calculating `e ^ (f * ln(2))`, where `e` is Euler's number:\\n * - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\\n * - The exponentiation of each binary exponent is given (pre-calculated)\\n * - The exponentiation of r is calculated via Taylor series for e^x, where x = r\\n * - The exponentiation of the input is calculated by multiplying the intermediate results above\\n * - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859\\n */\\n function exp2(Fraction memory f) internal pure returns (Fraction memory) {\\n uint256 x = MathEx.mulDivF(LN2, f.n, f.d);\\n uint256 y;\\n uint256 z;\\n uint256 n;\\n\\n if (x >= (ONE << 4)) {\\n revert Overflow();\\n }\\n\\n unchecked {\\n z = y = x % (ONE >> 3); // get the input modulo 2^(-3)\\n z = (z * y) / ONE;\\n n += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\\n z = (z * y) / ONE;\\n n += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\\n z = (z * y) / ONE;\\n n += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\\n z = (z * y) / ONE;\\n n += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\\n z = (z * y) / ONE;\\n n += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\\n z = (z * y) / ONE;\\n n += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\\n z = (z * y) / ONE;\\n n += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\\n z = (z * y) / ONE;\\n n += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\\n z = (z * y) / ONE;\\n n += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\\n z = (z * y) / ONE;\\n n += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\\n z = (z * y) / ONE;\\n n += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000001c638; // add y^16 * (20! / 16!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000000017c; // add y^18 * (20! / 18!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000014; // add y^19 * (20! / 19!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000001; // add y^20 * (20! / 20!)\\n n = n / 0x21c3677c82b40000 + y + ONE; // divide by 20! and then add y^1 / 1! + y^0 / 0!\\n\\n if ((x & (ONE >> 3)) != 0)\\n n = (n * 0x1c3d6a24ed82218787d624d3e5eba95f9) / 0x18ebef9eac820ae8682b9793ac6d1e776; // multiply by e^(2^-3)\\n if ((x & (ONE >> 2)) != 0)\\n n = (n * 0x18ebef9eac820ae8682b9793ac6d1e778) / 0x1368b2fc6f9609fe7aceb46aa619baed4; // multiply by e^(2^-2)\\n if ((x & (ONE >> 1)) != 0)\\n n = (n * 0x1368b2fc6f9609fe7aceb46aa619baed5) / 0x0bc5ab1b16779be3575bd8f0520a9f21f; // multiply by e^(2^-1)\\n if ((x & (ONE << 0)) != 0)\\n n = (n * 0x0bc5ab1b16779be3575bd8f0520a9f21e) / 0x0454aaa8efe072e7f6ddbab84b40a55c9; // multiply by e^(2^+0)\\n if ((x & (ONE << 1)) != 0)\\n n = (n * 0x0454aaa8efe072e7f6ddbab84b40a55c5) / 0x00960aadc109e7a3bf4578099615711ea; // multiply by e^(2^+1)\\n if ((x & (ONE << 2)) != 0)\\n n = (n * 0x00960aadc109e7a3bf4578099615711d7) / 0x0002bf84208204f5977f9a8cf01fdce3d; // multiply by e^(2^+2)\\n if ((x & (ONE << 3)) != 0)\\n n = (n * 0x0002bf84208204f5977f9a8cf01fdc307) / 0x0000003c6ab775dd0b95b4cbee7e65d11; // multiply by e^(2^+3)\\n }\\n\\n return Fraction({ n: n, d: ONE });\\n }\\n\\n /**\\n * @dev returns the value of `x * y`\\n */\\n function _mul512(uint256 x, uint256 y) private pure returns (uint256, uint256) {\\n uint256 p = _mulModMax(x, y);\\n uint256 q = _unsafeMul(x, y);\\n if (p >= q) {\\n unchecked {\\n // safe because `p >= q`\\n return (p - q, q);\\n }\\n }\\n unchecked {\\n // safe because `p < q` hence `_unsafeSub(p, q) > 0`\\n return (_unsafeSub(p, q) - 1, q);\\n }\\n }\\n\\n /**\\n * @dev returns the value of `x - y`\\n */\\n function _sub512(uint256 xhi, uint256 xlo, uint256 y) private pure returns (uint256, uint256) {\\n if (xlo >= y) {\\n unchecked {\\n // safe because `xlo >= y`\\n return (xhi, xlo - y);\\n }\\n }\\n return (xhi - 1, _unsafeSub(xlo, y));\\n }\\n\\n /**\\n * @dev returns the value of `x / pow2n`, given that `x` is divisible by `pow2n`\\n */\\n function _div512(uint256 xhi, uint256 xlo, uint256 pow2n) private pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n uint256 pow2nInv = _unsafeAdd(_unsafeSub(0, pow2n) / pow2n, 1); // `1 << (256 - n)`\\n return _unsafeMul(xhi, pow2nInv) | (xlo / pow2n); // `(xhi << (256 - n)) | (xlo >> n)`\\n }\\n }\\n\\n /**\\n * @dev returns the inverse of `d` modulo `2 ^ 256`, given that `d` is congruent to `1` modulo `2`\\n */\\n function _inv256(uint256 d) private pure returns (uint256) {\\n // approximate the root of `f(x) = 1 / x - d` using the newton\\u2013raphson convergence method\\n uint256 x = 1;\\n unchecked {\\n // safe because `i < 8`\\n for (uint256 i = 0; i < 8; i++) {\\n x = _unsafeMul(x, _unsafeSub(2, _unsafeMul(x, d))); // `x = x * (2 - x * d) mod 2 ^ 256`\\n }\\n }\\n return x;\\n }\\n\\n /**\\n * @dev returns `(x + y) % 2 ^ 256`\\n */\\n function _unsafeAdd(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x + y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x - y) % 2 ^ 256`\\n */\\n function _unsafeSub(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x - y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x * y) % 2 ^ 256`\\n */\\n function _unsafeMul(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x * y;\\n }\\n }\\n\\n /**\\n * @dev returns `x * y % (2 ^ 256 - 1)`\\n */\\n function _mulModMax(uint256 x, uint256 y) private pure returns (uint256) {\\n return mulmod(x, y, type(uint256).max);\\n }\\n\\n /**\\n * @dev returns `x * y % z`\\n */\\n function _mulMod(uint256 x, uint256 y, uint256 z) private pure returns (uint256) {\\n return mulmod(x, y, z);\\n }\\n}\\n\",\"keccak256\":\"0x2ff481334338c5d5b13f918a3a58dfebb9ec3329848117acd7ac7e63382664c5\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = version();\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bool checkVersion, bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n uint16 _version = version();\\n if (checkVersion && initializations != _version) {\\n revert AlreadyInitialized();\\n } else if (!checkVersion) {\\n initializations = _version;\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51a93a5b7f213049503a865250848012d2e4f76c359559c00b6abd5314b1908e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf6f3ad1ec3ee378729ebe1ffc0ac72e95a6353a9ec5b85fdf3e4c3b0f54a5f1e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xcc42138a568e5b5e6e1b96402d351ea04627e03bf24c0b62439910d3fda2773c\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { Token } from \\\"../../token/Token.sol\\\";\\n\\n/**\\n * @dev an interface for a vault\\n */\\ninterface IVault {\\n /**\\n * @dev withdraws funds held by the contract and sends them to an account\\n */\\n function withdrawFunds(\\n Token token,\\n address payable target,\\n uint256 amount\\n ) external;\\n}\\n\",\"keccak256\":\"0xe7ac355f02fc6a9cbec017f21e764f5d717b4efc77ea4b00eb729979dc686fc2\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xa5068bacf412d0eac67377cfed9cc2bd6b36099cc4bba9f360a38d05a7bf4a04\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/vortex/CarbonVortex.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ICarbonVortex } from \\\"./interfaces/ICarbonVortex.sol\\\";\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { IVault } from \\\"../utility/interfaces/IVault.sol\\\";\\nimport { ICarbonController } from \\\"../carbon/interfaces/ICarbonController.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { Token, NATIVE_TOKEN } from \\\"../token/Token.sol\\\";\\nimport { Utils } from \\\"../utility/Utils.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { ExpDecayMath } from \\\"../utility/ExpDecayMath.sol\\\";\\nimport { PPM_RESOLUTION, MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @notice CarbonVortex contract\\n */\\ncontract CarbonVortex is ICarbonVortex, Upgradeable, ReentrancyGuardUpgradeable, Utils {\\n using Address for address payable;\\n using SafeCast for uint256;\\n\\n uint128 private constant INITIAL_PRICE_SOURCE_AMOUNT = type(uint128).max;\\n uint128 private constant INITIAL_PRICE_TARGET_AMOUNT = 1e12;\\n\\n // addresses for token withdrawal\\n ICarbonController private immutable _carbonController;\\n IVault private immutable _oldVortex;\\n IVault private immutable _vault;\\n\\n // address for token collection - collects all swapped target/final target tokens\\n address payable private immutable _transferAddress;\\n\\n // first token for swapping\\n Token private immutable _targetToken;\\n // second (optional) token for swapping\\n Token private immutable _finalTargetToken;\\n\\n // total target (if no finalTarget token is defined) / finalTarget tokens collected in transferAddress\\n uint256 private _totalCollected;\\n\\n // rewards ppm (points per million) - used to calculate rewards for the caller\\n uint32 private _rewardsPPM;\\n\\n // price reset multiplier - used to reset the price after a trade in special cases\\n uint32 private _priceResetMultiplier;\\n\\n // min token sale amount multiplier - used to reset the price after execute in special cases\\n uint32 private _minTokenSaleAmountMultiplier;\\n\\n // time until the price gets halved for the target token during a trade\\n uint32 private _targetTokenPriceDecayHalfLife;\\n\\n // time until the price gets halved for the target token on price reset during a trade\\n uint32 private _targetTokenPriceDecayHalfLifeOnReset;\\n\\n // time until the price gets halved for all tokens when auction is initialized\\n uint32 private _priceDecayHalfLife;\\n\\n // token to pair disabled mapping (disabled pairs aren't tradeable)\\n mapping(Token token => bool pairDisabled) private _disabledPairs;\\n\\n // token to trading start time mapping\\n mapping(Token token => uint32 tradingStartTime) private _tradingStartTimes;\\n\\n // token to initial price mapping\\n mapping(Token token => Price initialPrice) private _initialPrice;\\n\\n // min token sale amounts - resets the token price if below this amount after a call to execute\\n // resets the current sale amount if below this amount after a trade (for target token)\\n mapping(Token token => uint128 _minTokenSaleAmount) private _minTokenSaleAmounts;\\n\\n // initial and current target token sale amount - for targetToken->finalTargetToken trades\\n SaleAmount private _targetTokenSaleAmount;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 7] private __gap;\\n\\n /**\\n * @dev used to set immutable state variables and initialize the implementation\\n */\\n constructor(\\n ICarbonController carbonController,\\n IVault vault,\\n IVault oldVortex,\\n address payable transferAddress,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(transferAddress) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\n _oldVortex = oldVortex;\\n\\n _transferAddress = transferAddress;\\n\\n _targetToken = targetTokenInit;\\n _finalTargetToken = finalTargetTokenInit;\\n initialize();\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize() public initializer {\\n __CarbonVortex_init();\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __CarbonVortex_init() internal onlyInitializing {\\n __Upgradeable_init();\\n __ReentrancyGuard_init();\\n\\n __CarbonVortex_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __CarbonVortex_init_unchained() internal onlyInitializing {\\n // set rewards PPM to 5000\\n _setRewardsPPM(5000);\\n // set price reset multiplier to 2x\\n _setPriceResetMultiplier(2);\\n // set min token sale amount multiplier to 4x\\n _setMinTokenSaleAmountMultiplier(4);\\n // set price decay half-life to 12 hours\\n _setPriceDecayHalfLife(12 hours);\\n // set target token price decay half-life to 12 hours\\n _setTargetTokenPriceDecayHalfLife(12 hours);\\n // set target token price decay half-life to 10 days\\n _setTargetTokenPriceDecayHalfLifeOnReset(10 days);\\n // set initial target token sale amount to 100 eth\\n _setMaxTargetTokenSaleAmount(uint128(100) * uint128(10) ** _targetToken.decimals());\\n // set min target token sale amount to 10 eth\\n _setMinTokenSaleAmount(_targetToken, uint128(10) * uint128(10) ** _targetToken.decimals());\\n }\\n\\n /**\\n * @notice authorize the contract to receive the native token\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev perform various validations for the token array\\n */\\n modifier validateTokens(Token[] calldata tokens) {\\n _validateTokens(tokens);\\n _;\\n }\\n\\n /**\\n * @dev validate token\\n */\\n modifier validToken(Token token) {\\n _validToken(token);\\n _;\\n }\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure override(IVersioned, Upgradeable) returns (uint16) {\\n return 2;\\n }\\n\\n /**\\n * @notice sets the rewards ppm\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setRewardsPPM(uint32 newRewardsPPM) external onlyAdmin validFee(newRewardsPPM) {\\n _setRewardsPPM(newRewardsPPM);\\n }\\n\\n /**\\n * @notice sets the price reset multiplier\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setPriceResetMultiplier(\\n uint32 newPriceResetMultiplier\\n ) external onlyAdmin greaterThanZero(newPriceResetMultiplier) {\\n _setPriceResetMultiplier(newPriceResetMultiplier);\\n }\\n\\n /**\\n * @notice sets the minimum token sale amount multiplier\\n *\\n * Requirements:\\n *\\n * - The caller must be the admin of the contract.\\n */\\n function setMinTokenSaleAmountMultiplier(\\n uint32 newMinTokenSaleAmountMultiplier\\n ) external onlyAdmin greaterThanZero(newMinTokenSaleAmountMultiplier) {\\n _setMinTokenSaleAmountMultiplier(newMinTokenSaleAmountMultiplier);\\n }\\n\\n /**\\n * @notice sets the price decay half-life for all tokens except target\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setPriceDecayHalfLife(\\n uint32 newPriceDecayHalfLife\\n ) external onlyAdmin greaterThanZero(newPriceDecayHalfLife) {\\n _setPriceDecayHalfLife(newPriceDecayHalfLife);\\n }\\n\\n /**\\n * @notice sets the price decay half-life for the target token\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setTargetTokenPriceDecayHalfLife(\\n uint32 newPriceDecayHalfLife\\n ) external onlyAdmin greaterThanZero(newPriceDecayHalfLife) {\\n _setTargetTokenPriceDecayHalfLife(newPriceDecayHalfLife);\\n }\\n\\n /**\\n * @notice sets the price decay half-life for the target token on reset\\n *\\n * Requirements:\\n *\\n * - The caller must be the admin of the contract.\\n */\\n function setTargetTokenPriceDecayHalfLifeOnReset(\\n uint32 newPriceDecayHalfLife\\n ) external onlyAdmin greaterThanZero(newPriceDecayHalfLife) {\\n _setTargetTokenPriceDecayHalfLifeOnReset(newPriceDecayHalfLife);\\n }\\n\\n /**\\n * @notice sets the max (or initial) target token sale amount\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setMaxTargetTokenSaleAmount(\\n uint128 newMaxTargetTokenSaleAmount\\n ) external onlyAdmin greaterThanZero(newMaxTargetTokenSaleAmount) {\\n _setMaxTargetTokenSaleAmount(newMaxTargetTokenSaleAmount);\\n }\\n\\n /**\\n * @notice sets the min target token sale amount\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setMinTargetTokenSaleAmount(\\n uint128 newMinTargetTokenSaleAmount\\n ) external onlyAdmin greaterThanZero(newMinTargetTokenSaleAmount) {\\n _setMinTokenSaleAmount(_targetToken, newMinTargetTokenSaleAmount);\\n }\\n\\n /**\\n * @notice sets if trading is enabled or disabled for a token\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function disablePair(Token token, bool disabled) external onlyAdmin {\\n _setPairDisabled(token, disabled);\\n }\\n\\n /**\\n * @dev withdraws funds held by the contract and sends them to an account\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function withdrawFunds(\\n Token[] calldata tokens,\\n address payable target,\\n uint256[] calldata amounts\\n ) external validAddress(target) validateTokens(tokens) nonReentrant onlyAdmin {\\n uint256 len = tokens.length;\\n if (len != amounts.length) {\\n revert InvalidAmountLength();\\n }\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n // safe due to nonReentrant modifier (forwards all available gas in case of ETH)\\n tokens[i].unsafeTransfer(target, amounts[i]);\\n }\\n\\n emit FundsWithdrawn({ tokens: tokens, caller: msg.sender, target: target, amounts: amounts });\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function rewardsPPM() external view returns (uint32) {\\n return _rewardsPPM;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function totalCollected() external view returns (uint256) {\\n return _totalCollected;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function targetToken() external view returns (Token) {\\n return _targetToken;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function finalTargetToken() external view returns (Token) {\\n return _finalTargetToken;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function availableTokens(Token token) external view returns (uint256) {\\n uint256 totalFees = 0;\\n if (address(_carbonController) != address(0)) {\\n totalFees += _carbonController.accumulatedFees(token);\\n }\\n if (address(_vault) != address(0)) {\\n totalFees += token.balanceOf(address(_vault));\\n }\\n if (address(_oldVortex) != address(0)) {\\n totalFees += token.balanceOf(address(_oldVortex));\\n }\\n return totalFees + token.balanceOf(address(this));\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function execute(Token[] calldata tokens) external nonReentrant validateTokens(tokens) {\\n uint256 len = tokens.length;\\n\\n // allocate array for the fee amounts for the tokens\\n uint256[] memory feeAmounts = new uint256[](len);\\n // allocate array for the reward amounts for caller\\n uint256[] memory rewardAmounts = new uint256[](len);\\n // cache rewardsPPM to save gas\\n uint256 rewardsPPMValue = _rewardsPPM;\\n\\n // cache address checks to save gas\\n bool carbonControllerIsNotZero = address(_carbonController) != address(0);\\n bool vaultIsNotZero = address(_vault) != address(0);\\n bool oldVortexIsNotZero = address(_oldVortex) != address(0);\\n\\n // withdraw fees from carbon, vault and old vortex\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n // withdraw token fees\\n uint256 totalFeeAmount = 0;\\n if (carbonControllerIsNotZero) {\\n totalFeeAmount += _carbonController.withdrawFees(token, type(uint256).max, address(this));\\n }\\n if (vaultIsNotZero) {\\n // get vault token balance\\n uint256 vaultBalance = token.balanceOf(address(_vault));\\n // withdraw vault token balance\\n _vault.withdrawFunds(token, payable(address(this)), vaultBalance);\\n totalFeeAmount += vaultBalance;\\n }\\n if (oldVortexIsNotZero) {\\n // get old vortex token balance\\n uint256 oldVortexBalance = token.balanceOf(address(_oldVortex));\\n // withdraw old vortex token balance\\n _oldVortex.withdrawFunds(token, payable(address(this)), oldVortexBalance);\\n totalFeeAmount += oldVortexBalance;\\n }\\n feeAmounts[i] = totalFeeAmount;\\n\\n // get reward amount for token\\n rewardAmounts[i] = MathEx.mulDivF(totalFeeAmount, rewardsPPMValue, PPM_RESOLUTION);\\n }\\n\\n // go through all tokens and start / reset dutch auction if necessary\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n uint256 totalFeeAmount = feeAmounts[i];\\n // skip the final target token\\n if (token == _finalTargetToken) {\\n continue;\\n }\\n // skip token if no fees have accumulated or token pair is disabled\\n if (totalFeeAmount == 0 || _disabledPairs[token]) {\\n continue;\\n }\\n // get fee and reward amounts\\n uint256 rewardAmount = rewardAmounts[i];\\n uint256 feeAmount = totalFeeAmount - rewardAmount;\\n\\n if (token == _targetToken) {\\n // if _finalTargetToken is not set, directly transfer the fees to the transfer address\\n if (Token.unwrap(_finalTargetToken) == address(0)) {\\n // safe due to nonReentrant modifier (forwards all gas fees in case of the native token)\\n _targetToken.unsafeTransfer(_transferAddress, feeAmount);\\n // increment totalCollected amount\\n _totalCollected += feeAmount;\\n } else if (\\n !_tradingEnabled(token) ||\\n _amountAvailableForTrading(token) < _minTokenSaleAmounts[token] ||\\n _auctionPriceIsBelowMinimum(token)\\n ) {\\n // reset trading for target token\\n _resetTradingTarget(rewardAmount);\\n }\\n } else {\\n uint128 tradingAmount = _amountAvailableForTrading(token);\\n if (\\n !_tradingEnabled(token) ||\\n tradingAmount - feeAmount < _minTokenSaleAmounts[token] ||\\n tradingAmount > _minTokenSaleAmountMultiplier * _minTokenSaleAmounts[token] ||\\n _auctionPriceIsBelowMinimum(token)\\n ) {\\n // reset trading for token\\n _resetTrading(token, rewardAmount);\\n }\\n }\\n }\\n\\n // allocate rewards to caller\\n _allocateRewards(msg.sender, tokens, rewardAmounts);\\n }\\n\\n /**\\n * @dev resets dutch auction for target token -> TKN trades and set the initial price to max possible\\n */\\n function _resetTrading(Token token, uint256 rewardAmount) private {\\n // reset the auction with the initial price\\n Price memory price = _resetAuction(token);\\n // set min token sale amount\\n _setMinTokenSaleAmount(token, (token.balanceOf(address(this)) - rewardAmount).toUint128() / 2);\\n emit TradingReset({ token: token, price: price });\\n }\\n\\n /**\\n * @dev resets dutch auction for finalTargetToken->targetToken trades and set the initial price to max possible\\n */\\n function _resetTradingTarget(uint256 rewardAmount) private {\\n // reset the auction with the initial price\\n Price memory price = _resetAuction(_targetToken);\\n // reset the current target token sale amount\\n _targetTokenSaleAmount.current = Math\\n .min(_targetToken.balanceOf(address(this)) - rewardAmount, _targetTokenSaleAmount.initial)\\n .toUint128();\\n // set price decay halflife to the current price decay halflife\\n _setTargetTokenPriceDecayHalfLife(_priceDecayHalfLife);\\n // emit trading reset event\\n emit TradingReset({ token: _targetToken, price: price });\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function priceResetMultiplier() external view returns (uint32) {\\n return _priceResetMultiplier;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function minTokenSaleAmountMultiplier() external view returns (uint32) {\\n return _minTokenSaleAmountMultiplier;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function priceDecayHalfLife() external view returns (uint32) {\\n return _priceDecayHalfLife;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function targetTokenPriceDecayHalfLife() external view returns (uint32) {\\n return _targetTokenPriceDecayHalfLife;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function targetTokenPriceDecayHalfLifeOnReset() external view returns (uint32) {\\n return _targetTokenPriceDecayHalfLifeOnReset;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function targetTokenSaleAmount() external view returns (SaleAmount memory) {\\n return _targetTokenSaleAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function minTokenSaleAmount(Token token) external view returns (uint128) {\\n return _minTokenSaleAmounts[token];\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function minTargetTokenSaleAmount() external view returns (uint128) {\\n return _minTokenSaleAmounts[_targetToken];\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function pairDisabled(Token token) external view returns (bool) {\\n return _disabledPairs[token];\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function tradingEnabled(Token token) external view returns (bool) {\\n return _tradingEnabled(token);\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function amountAvailableForTrading(Token token) external view returns (uint128) {\\n return _amountAvailableForTrading(token);\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function expectedTradeReturn(Token token, uint128 sourceAmount) external view validToken(token) returns (uint128) {\\n Price memory currentPrice = tokenPrice(token);\\n // revert if price is not valid\\n _validPrice(currentPrice);\\n // calculate the target amount based on the current price and token\\n uint128 targetAmount = MathEx\\n .mulDivF(currentPrice.targetAmount, sourceAmount, currentPrice.sourceAmount)\\n .toUint128();\\n // revert if not enough amount available for trade\\n if (targetAmount > _amountAvailableForTrading(token)) {\\n revert InsufficientAmountForTrading();\\n }\\n return targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function expectedTradeInput(Token token, uint128 targetAmount) public view validToken(token) returns (uint128) {\\n // revert if not enough amount available for trade\\n if (targetAmount > _amountAvailableForTrading(token)) {\\n revert InsufficientAmountForTrading();\\n }\\n Price memory currentPrice = tokenPrice(token);\\n // revert if current price is not valid\\n _validPrice(currentPrice);\\n // calculate the trade input based on the current price\\n return MathEx.mulDivC(currentPrice.sourceAmount, targetAmount, currentPrice.targetAmount).toUint128();\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function tokenPrice(Token token) public view returns (Price memory) {\\n // cache trading start time to save gas\\n uint32 tradingStartTime = _tradingStartTimes[token];\\n // revert if trading hasn't been enabled for a token\\n if (tradingStartTime == 0) {\\n revert TradingDisabled();\\n }\\n // get time elapsed since trading was enabled\\n uint32 timeElapsed = uint32(block.timestamp) - tradingStartTime;\\n // get initial price as set by resetTrading\\n Price memory price = _initialPrice[token];\\n // get the halflife for the token\\n uint32 currentPriceDecayHalfLife = token == _targetToken ? _targetTokenPriceDecayHalfLife : _priceDecayHalfLife;\\n // get the current price by adjusting the amount with the exp decay formula\\n price.sourceAmount = ExpDecayMath\\n .calcExpDecay(price.sourceAmount, timeElapsed, currentPriceDecayHalfLife)\\n .toUint128();\\n // return the price\\n return price;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function trade(\\n Token token,\\n uint128 targetAmount,\\n uint128 maxInput\\n ) external payable nonReentrant validToken(token) greaterThanZero(targetAmount) {\\n uint128 sourceAmount;\\n if (token == _targetToken) {\\n sourceAmount = _sellTargetForFinalTarget(targetAmount, maxInput);\\n } else {\\n sourceAmount = _sellTokenForTargetToken(token, targetAmount, maxInput);\\n }\\n emit TokenTraded({ caller: msg.sender, token: token, sourceAmount: sourceAmount, targetAmount: targetAmount });\\n }\\n\\n function _sellTokenForTargetToken(Token token, uint128 targetAmount, uint128 maxInput) private returns (uint128) {\\n uint128 sourceAmount = expectedTradeInput(token, targetAmount);\\n // revert if trade requires 0 target token\\n if (sourceAmount == 0) {\\n revert InvalidTrade();\\n }\\n // revert if trade requires more than maxInput\\n if (sourceAmount > maxInput) {\\n revert GreaterThanMaxInput();\\n }\\n // revert if unnecessary native token is received\\n if (_targetToken != NATIVE_TOKEN && msg.value > 0) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n // check enough target token (if target token is native) has been sent for the trade\\n if (_targetToken == NATIVE_TOKEN && msg.value < sourceAmount) {\\n revert InsufficientNativeTokenSent();\\n }\\n _targetToken.safeTransferFrom(msg.sender, address(this), sourceAmount);\\n // transfer the tokens to caller\\n token.safeTransfer(msg.sender, targetAmount);\\n\\n // if no final target token is defined, transfer the target token to `transferAddress`\\n if (Token.unwrap(_finalTargetToken) == address(0)) {\\n // safe due to nonreenrant modifier (forwards all available gas if token is native)\\n _targetToken.unsafeTransfer(_transferAddress, sourceAmount);\\n // increment total collected in `transferAddress`\\n _totalCollected += sourceAmount;\\n }\\n\\n // if remaining balance is below the min token sale amount, reset the auction\\n if (_amountAvailableForTrading(token) < _minTokenSaleAmounts[token]) {\\n _resetTrading(token, 0);\\n }\\n\\n // if available target token trading amount is below the min target token sale amount, reset the target token auction\\n if (\\n Token.unwrap(_finalTargetToken) != address(0) &&\\n _amountAvailableForTrading(_targetToken) <\\n _minTokenSaleAmounts[_targetToken] / _minTokenSaleAmountMultiplier\\n ) {\\n _resetTradingTarget(0);\\n }\\n\\n // if the target token is native, refund any excess native token to caller\\n if (_targetToken == NATIVE_TOKEN && msg.value > sourceAmount) {\\n payable(msg.sender).sendValue(msg.value - sourceAmount);\\n }\\n\\n return sourceAmount;\\n }\\n\\n function _sellTargetForFinalTarget(uint128 targetAmount, uint128 maxInput) private returns (uint128) {\\n uint128 sourceAmount = expectedTradeInput(_targetToken, targetAmount);\\n // revert if trade requires 0 finalTarget tokens\\n if (sourceAmount == 0) {\\n revert InvalidTrade();\\n }\\n // revert if trade requires more than maxInput\\n if (sourceAmount > maxInput) {\\n revert GreaterThanMaxInput();\\n }\\n\\n // check enough final target token (if final target token is native) has been sent for the trade\\n if (_finalTargetToken == NATIVE_TOKEN) {\\n if (msg.value < sourceAmount) {\\n revert InsufficientNativeTokenSent();\\n }\\n payable(_transferAddress).sendValue(sourceAmount);\\n } else {\\n // revert if unnecessary native token is received\\n if (msg.value > 0) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n // transfer the tokens from the user to the _transferAddress\\n _finalTargetToken.safeTransferFrom(msg.sender, _transferAddress, sourceAmount);\\n }\\n\\n // transfer the _targetToken to the user\\n // safe due to nonReentrant modifier (forwards all available gas if native)\\n _targetToken.unsafeTransfer(msg.sender, targetAmount);\\n\\n // if final target token is native, refund any excess native token to caller\\n if (_finalTargetToken == NATIVE_TOKEN && msg.value > sourceAmount) {\\n payable(msg.sender).sendValue(msg.value - sourceAmount);\\n }\\n\\n // increment total collected in _transferAddress\\n _totalCollected += sourceAmount;\\n\\n // update the available target token sale amount\\n _targetTokenSaleAmount.current -= targetAmount;\\n\\n // check if remaining target token sale amount is below the min target token sale amount\\n if (_targetTokenSaleAmount.current < _minTokenSaleAmounts[_targetToken]) {\\n // top up the target token sale amount\\n _targetTokenSaleAmount.current = Math\\n .min(_targetToken.balanceOf(address(this)), _targetTokenSaleAmount.initial)\\n .toUint128();\\n // reset the price to price * priceResetMultiplier and restart trading\\n Price memory price = tokenPrice(_targetToken);\\n price.sourceAmount *= _priceResetMultiplier;\\n _initialPrice[_targetToken] = price;\\n _tradingStartTimes[_targetToken] = uint32(block.timestamp);\\n // slow down halflife to `targetTokenPriceDecayHalfLifeOnReset`\\n _setTargetTokenPriceDecayHalfLife(_targetTokenPriceDecayHalfLifeOnReset);\\n // emit price updated event\\n emit PriceUpdated({ token: _targetToken, price: price });\\n }\\n\\n return sourceAmount;\\n }\\n\\n /**\\n * @dev Set minimum token sale amount multiplier helper\\n */\\n function _setMinTokenSaleAmountMultiplier(uint32 newMinTokenSaleAmountMultiplier) private {\\n uint32 prevMinTokenSaleAmountMultiplier = _minTokenSaleAmountMultiplier;\\n\\n // return if the minimum token sale amount multiplier is the same\\n if (prevMinTokenSaleAmountMultiplier == newMinTokenSaleAmountMultiplier) {\\n return;\\n }\\n\\n _minTokenSaleAmountMultiplier = newMinTokenSaleAmountMultiplier;\\n\\n emit MinTokenSaleAmountMultiplierUpdated({\\n prevMinTokenSaleAmountMultiplier: prevMinTokenSaleAmountMultiplier,\\n newMinTokenSaleAmountMultiplier: newMinTokenSaleAmountMultiplier\\n });\\n }\\n\\n /**\\n * @dev set price reset multiplier helper\\n */\\n function _setPriceResetMultiplier(uint32 newPriceResetMultiplier) private {\\n uint32 prevPriceResetMultiplier = _priceResetMultiplier;\\n\\n // return if the price reset multiplier is the same\\n if (prevPriceResetMultiplier == newPriceResetMultiplier) {\\n return;\\n }\\n\\n _priceResetMultiplier = newPriceResetMultiplier;\\n\\n emit PriceResetMultiplierUpdated({\\n prevPriceResetMultiplier: prevPriceResetMultiplier,\\n newPriceResetMultiplier: newPriceResetMultiplier\\n });\\n }\\n\\n /**\\n * @dev set price decay half-life helper\\n */\\n function _setPriceDecayHalfLife(uint32 newPriceDecayHalfLife) private {\\n uint32 prevPriceDecayHalfLife = _priceDecayHalfLife;\\n\\n // return if the price decay half-life is the same\\n if (prevPriceDecayHalfLife == newPriceDecayHalfLife) {\\n return;\\n }\\n\\n _priceDecayHalfLife = newPriceDecayHalfLife;\\n\\n emit PriceDecayHalfLifeUpdated({\\n prevPriceDecayHalfLife: prevPriceDecayHalfLife,\\n newPriceDecayHalfLife: newPriceDecayHalfLife\\n });\\n }\\n\\n /**\\n * @dev set target token price decay half-life helper\\n */\\n function _setTargetTokenPriceDecayHalfLife(uint32 newPriceDecayHalfLife) private {\\n uint32 prevPriceDecayHalfLife = _targetTokenPriceDecayHalfLife;\\n\\n // return if the price decay half-life is the same\\n if (prevPriceDecayHalfLife == newPriceDecayHalfLife) {\\n return;\\n }\\n\\n _targetTokenPriceDecayHalfLife = newPriceDecayHalfLife;\\n\\n emit TargetTokenPriceDecayHalfLifeUpdated({\\n prevPriceDecayHalfLife: prevPriceDecayHalfLife,\\n newPriceDecayHalfLife: newPriceDecayHalfLife\\n });\\n }\\n\\n /**\\n * @dev set target token price decay half-life on price reset helper\\n */\\n function _setTargetTokenPriceDecayHalfLifeOnReset(uint32 newPriceDecayHalfLife) private {\\n uint32 prevPriceDecayHalfLife = _targetTokenPriceDecayHalfLifeOnReset;\\n\\n // Return if the price decay half-life is the same.\\n if (prevPriceDecayHalfLife == newPriceDecayHalfLife) {\\n return;\\n }\\n\\n _targetTokenPriceDecayHalfLifeOnReset = newPriceDecayHalfLife;\\n\\n emit TargetTokenPriceDecayHalfLifeOnResetUpdated({\\n prevPriceDecayHalfLife: prevPriceDecayHalfLife,\\n newPriceDecayHalfLife: newPriceDecayHalfLife\\n });\\n }\\n\\n /**\\n * @dev set max target token sale amount helper\\n */\\n function _setMaxTargetTokenSaleAmount(uint128 newTargetTokenSaleAmount) private {\\n uint128 prevTargetTokenSaleAmount = _targetTokenSaleAmount.initial;\\n\\n // return if the target token sale amount is the same\\n if (prevTargetTokenSaleAmount == newTargetTokenSaleAmount) {\\n return;\\n }\\n\\n _targetTokenSaleAmount.initial = newTargetTokenSaleAmount;\\n\\n // check if the new max sale amount is below the current available target token sale amount\\n if (newTargetTokenSaleAmount < _targetTokenSaleAmount.current) {\\n _targetTokenSaleAmount.current = Math\\n .min(_targetToken.balanceOf(address(this)), newTargetTokenSaleAmount)\\n .toUint128();\\n }\\n\\n emit MaxTargetTokenSaleAmountUpdated({\\n prevTargetTokenSaleAmount: prevTargetTokenSaleAmount,\\n newTargetTokenSaleAmount: newTargetTokenSaleAmount\\n });\\n }\\n\\n /**\\n * @dev set min token sale amount helper\\n */\\n function _setMinTokenSaleAmount(Token token, uint128 newMinTokenSaleAmount) private {\\n uint128 prevMinTokenSaleAmount = _minTokenSaleAmounts[token];\\n\\n // return if the min eth sale amount is the same\\n if (prevMinTokenSaleAmount == newMinTokenSaleAmount) {\\n return;\\n }\\n\\n _minTokenSaleAmounts[token] = newMinTokenSaleAmount;\\n\\n emit MinTokenSaleAmountUpdated({\\n token: token,\\n prevMinTokenSaleAmount: prevMinTokenSaleAmount,\\n newMinTokenSaleAmount: newMinTokenSaleAmount\\n });\\n }\\n\\n function _setRewardsPPM(uint32 newRewardsPPM) private {\\n uint32 prevRewardsPPM = _rewardsPPM;\\n\\n // return if the rewards PPM is the same\\n if (prevRewardsPPM == newRewardsPPM) {\\n return;\\n }\\n\\n _rewardsPPM = newRewardsPPM;\\n\\n emit RewardsUpdated({ prevRewardsPPM: prevRewardsPPM, newRewardsPPM: newRewardsPPM });\\n }\\n\\n function _setPairDisabled(Token token, bool disabled) private {\\n bool prevPairStatus = _disabledPairs[token];\\n\\n // return if the pair status is the same\\n if (prevPairStatus == disabled) {\\n return;\\n }\\n\\n _disabledPairs[token] = disabled;\\n\\n emit PairDisabledStatusUpdated(token, prevPairStatus, disabled);\\n }\\n\\n /**\\n * @dev returns true if the auction price is below or equal to the minimum possible price\\n * @dev check if timeElapsed / priceDecayHalfLife >= 128\\n */\\n function _auctionPriceIsBelowMinimum(Token token) private view returns (bool) {\\n // cache trading start time to save gas\\n uint32 tradingStartTime = _tradingStartTimes[token];\\n // trading hasn't been enabled, return false\\n if (tradingStartTime == 0) {\\n return false;\\n }\\n // get time elapsed since trading was enabled\\n uint32 timeElapsed = uint32(block.timestamp) - tradingStartTime;\\n // get the halflife for the token\\n uint32 currentPriceDecayHalfLife = token == _targetToken ? _targetTokenPriceDecayHalfLife : _priceDecayHalfLife;\\n // check if the maximum amount of halflifes have been reached\\n return timeElapsed / currentPriceDecayHalfLife >= 128;\\n }\\n\\n /**\\n * @dev returns the token amount available for trading\\n */\\n function _amountAvailableForTrading(Token token) private view returns (uint128) {\\n if (token == _targetToken) {\\n return _targetTokenSaleAmount.current;\\n } else {\\n return token.balanceOf(address(this)).toUint128();\\n }\\n }\\n\\n /**\\n * @dev validate token helper\\n */\\n function _validToken(Token token) private view {\\n // validate trading is enabled for token\\n if (!_tradingEnabled(token)) {\\n revert TradingDisabled();\\n }\\n // validate pair isn't disabled\\n if (_disabledPairs[token]) {\\n revert PairDisabled();\\n }\\n }\\n\\n function _validateTokens(Token[] calldata tokens) private pure {\\n uint256 len = tokens.length;\\n if (len == 0) {\\n revert InvalidTokenLength();\\n }\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n // revert for invalid token address\\n if (token == Token.wrap(address(0))) {\\n revert InvalidToken();\\n }\\n // validate token has no duplicates\\n for (uint256 j = uncheckedInc(i); j < len; j = uncheckedInc(j)) {\\n if (token == tokens[j]) {\\n revert DuplicateToken();\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev validate token helper\\n */\\n function _validPrice(Price memory price) private pure {\\n if (price.sourceAmount == 0 || price.targetAmount == 0) {\\n revert InvalidPrice();\\n }\\n }\\n\\n /**\\n * @dev return true if trading is enabled for token\\n */\\n function _tradingEnabled(Token token) private view returns (bool) {\\n return _tradingStartTimes[token] != 0;\\n }\\n\\n /**\\n * @dev allocates the rewards to caller\\n */\\n function _allocateRewards(address sender, Token[] memory tokens, uint256[] memory rewardAmounts) private {\\n uint256 len = tokens.length;\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n uint256 rewardAmount = rewardAmounts[i];\\n // transfer the rewards to caller\\n // safe due to nonReentrant modifier (forwards all available gas in case of ETH)\\n token.unsafeTransfer(sender, rewardAmount);\\n }\\n }\\n\\n /**\\n * @dev helper function to reset the auction to the initial price\\n */\\n function _resetAuction(Token token) private returns (Price memory) {\\n Price memory price = Price({\\n sourceAmount: INITIAL_PRICE_SOURCE_AMOUNT,\\n targetAmount: INITIAL_PRICE_TARGET_AMOUNT\\n });\\n _tradingStartTimes[token] = uint32(block.timestamp);\\n _initialPrice[token] = price;\\n return price;\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x56206690262a997e01a8a62e5a19871743d361ce53d91d71d43470f3977eedba\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/vortex/interfaces/ICarbonVortex.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\n\\n/**\\n * @notice CarbonVortex interface\\n */\\ninterface ICarbonVortex is IUpgradeable {\\n error DuplicateToken();\\n error InvalidToken();\\n error InvalidTokenLength();\\n error InvalidAmountLength();\\n error InvalidPrice();\\n error InvalidTrade();\\n error TradingDisabled();\\n error PairDisabled();\\n error GreaterThanMaxInput();\\n error InsufficientNativeTokenSent();\\n error InsufficientAmountForTrading();\\n error UnnecessaryNativeTokenReceived();\\n\\n struct Price {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct SaleAmount {\\n uint128 initial;\\n uint128 current;\\n }\\n\\n /**\\n * @notice triggered when trading is reset for a token (dutch auction has been restarted)\\n */\\n event TradingReset(Token indexed token, Price price);\\n\\n /**\\n * @notice triggered after a successful trade is executed\\n */\\n event TokenTraded(address indexed caller, Token indexed token, uint128 sourceAmount, uint128 targetAmount);\\n\\n /**\\n * @notice triggered when the rewards ppm are updated\\n */\\n event RewardsUpdated(uint32 prevRewardsPPM, uint32 newRewardsPPM);\\n\\n /**\\n * @notice triggered when pair status is updated\\n */\\n event PairDisabledStatusUpdated(Token indexed token, bool prevStatus, bool newStatus);\\n\\n /**\\n * @notice triggered after the price updates for a token\\n */\\n event PriceUpdated(Token indexed token, Price price);\\n\\n /**\\n * @notice triggered when tokens have been withdrawn by the admin\\n */\\n event FundsWithdrawn(Token[] indexed tokens, address indexed caller, address indexed target, uint256[] amounts);\\n\\n /**\\n * @notice triggered when the price reset multiplier is updated\\n */\\n event PriceResetMultiplierUpdated(uint32 prevPriceResetMultiplier, uint32 newPriceResetMultiplier);\\n\\n /**\\n * @notice Triggered when the minimum token sale amount multiplier is updated\\n */\\n event MinTokenSaleAmountMultiplierUpdated(uint32 prevMinTokenSaleAmountMultiplier, uint32 newMinTokenSaleAmountMultiplier);\\n\\n /**\\n * @notice triggered when the price decay halflife is updated (for all tokens except the target token)\\n */\\n event PriceDecayHalfLifeUpdated(uint32 prevPriceDecayHalfLife, uint32 newPriceDecayHalfLife);\\n\\n /**\\n * @notice triggered when the price decay halflife is updated (for the target token only)\\n */\\n event TargetTokenPriceDecayHalfLifeUpdated(uint32 prevPriceDecayHalfLife, uint32 newPriceDecayHalfLife);\\n\\n /**\\n * @notice triggered when the price decay halflife on price reset is updated (for the target token only)\\n */\\n event TargetTokenPriceDecayHalfLifeOnResetUpdated(uint32 prevPriceDecayHalfLife, uint32 newPriceDecayHalfLife);\\n\\n /**\\n * @notice triggered when the target token sale amount is updated\\n */\\n event MaxTargetTokenSaleAmountUpdated(uint128 prevTargetTokenSaleAmount, uint128 newTargetTokenSaleAmount);\\n\\n /**\\n * @notice triggered when the min token sale amount is updated\\n */\\n event MinTokenSaleAmountUpdated(Token indexed token, uint128 prevMinTokenSaleAmount, uint128 newMinTokenSaleAmount);\\n\\n /**\\n * @notice returns the rewards ppm\\n */\\n function rewardsPPM() external view returns (uint32);\\n \\n /**\\n * @notice returns the price reset multiplier\\n */\\n function priceResetMultiplier() external view returns (uint32);\\n \\n /**\\n * @notice returns the min token sale amount multiplier\\n */\\n function minTokenSaleAmountMultiplier() external view returns (uint32);\\n\\n /**\\n * @notice returns the price decay half-life for all tokens except the target token\\n * @notice according to the exp decay formula\\n */\\n function priceDecayHalfLife() external view returns (uint32);\\n\\n /**\\n * @notice returns the price decay half-life for the target token according to the exp decay formula\\n */\\n function targetTokenPriceDecayHalfLife() external view returns (uint32);\\n\\n /**\\n * @notice returns the price decay half-life for the target token on reset (slow) according to the exp decay formula\\n */\\n function targetTokenPriceDecayHalfLifeOnReset() external view returns (uint32);\\n\\n /**\\n * @notice returns the total target (if no final target token has been defined) or final target tokens collected \\n */\\n function totalCollected() external view returns (uint256);\\n\\n /**\\n * @notice returns the initial and current target token sale amount\\n */\\n function targetTokenSaleAmount() external view returns (SaleAmount memory);\\n\\n /**\\n * @notice returns the min target token sale amount\\n */\\n function minTargetTokenSaleAmount() external view returns (uint128);\\n\\n /**\\n * @notice returns the min token sale amount\\n */\\n function minTokenSaleAmount(Token token) external view returns (uint128);\\n\\n /**\\n * @notice returns true if pair is disabled (admin-controllable)\\n */\\n function pairDisabled(Token token) external view returns (bool);\\n\\n /**\\n * @notice returns true if trading is enabled for token (dutch auction started)\\n */\\n function tradingEnabled(Token token) external view returns (bool);\\n\\n /**\\n * @notice returns the amount available for trading for the token\\n */\\n function amountAvailableForTrading(Token token) external view returns (uint128);\\n\\n /**\\n * @notice returns the target amount expected given a source amount\\n */\\n function expectedTradeReturn(Token token, uint128 sourceAmount) external view returns (uint128);\\n\\n /**\\n * @notice returns the source amount required given a target amount\\n */\\n function expectedTradeInput(Token token, uint128 targetAmount) external view returns (uint128);\\n\\n /**\\n * @notice returns the current token price (targetToken / TKN)\\n * @notice if token == targetToken, returns finalTargetToken / targetToken price\\n */\\n function tokenPrice(Token token) external view returns (Price memory);\\n\\n /**\\n * @notice returns the total available fees for the given token\\n */\\n function availableTokens(Token token) external view returns (uint256);\\n\\n /**\\n * @notice returns the target token\\n */\\n function targetToken() external view returns (Token);\\n\\n /**\\n * @notice returns the final target token\\n */\\n function finalTargetToken() external view returns (Token);\\n\\n /**\\n * @notice trades *targetToken* for *targetAmount* of *token* based on the current token price (trade by target amount)\\n * @notice if token == *targetToken*, trades *finalTargetToken* for amount of *targetToken* and also\\n * @notice resets the current token sale amount if it's below the min amount after a trade\\n * @notice reverts if source amount required is greater than maxInput\\n */\\n function trade(Token token, uint128 targetAmount, uint128 maxInput) external payable;\\n\\n /**\\n * @notice withdraws the fees of the provided token from Carbon and\\n * @notice enables trading for the token if not already enabled\\n */\\n function execute(Token[] calldata tokens) external;\\n}\\n\",\"keccak256\":\"0x16e329d3af2abb962274749760df9c5439a25090bee98e66f7bb67838c547e38\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n error ControllerAlreadySet();\\n error OnlyController();\\n\\n /**\\n * @dev returns the controller address\\n */\\n function controller() external view returns (address);\\n \\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xf849364f45555e654783d6df21ccefcded4175262889a316dc3e16bdf8f51f17\",\"license\":\"SEE LICENSE IN LICENSE\"}},\"version\":1}", - "bytecode": "0x6101406040523480156200001257600080fd5b5060405162006a1138038062006a11833981016040819052620000359162000dd3565b82620000418162000092565b826200004d8162000092565b6001600160a01b0380891660805287811660c05286811660a05285811660e0528481166101005283166101205262000084620000bd565b505050505050505062001042565b6001600160a01b038116620000ba5760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000de5750600054600160ff909116105b80620000fa5750303b158015620000fa575060005460ff166001145b620001635760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000187576000805461ff0019166101001790555b62000191620001da565b8015620000ba576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff16620002365760405162461bcd60e51b815260206004820152602b6024820152600080516020620069f183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200015a565b6200024062000256565b6200024a620002c6565b620002546200032c565b565b600054610100900460ff16620002b25760405162461bcd60e51b815260206004820152602b6024820152600080516020620069f183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200015a565b620002bc62000453565b62000254620004af565b600054610100900460ff16620003225760405162461bcd60e51b815260206004820152602b6024820152600080516020620069f183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200015a565b620002546200054f565b600054610100900460ff16620003885760405162461bcd60e51b815260206004820152602b6024820152600080516020620069f183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200015a565b62000395611388620005b2565b620003a1600262000627565b620003ad6004620006aa565b620003ba61a8c062000735565b620003c761a8c0620007b6565b620003d5620d2f0062000849565b62000416620003f6610100516001600160a01b0316620008ca60201b60201c565b6200040390600a62000fbb565b6200041090606462000fd5565b62000950565b610100516200025490620004336001600160a01b038216620008ca565b6200044090600a62000fbb565b6200044d90600a62000fd5565b62000a39565b600054610100900460ff16620002545760405162461bcd60e51b815260206004820152602b6024820152600080516020620069f183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200015a565b600054610100900460ff166200050b5760405162461bcd60e51b815260206004820152602b6024820152600080516020620069f183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200015a565b60c9805461ffff1916600217905562000534600080516020620069d18339815191528062000ae5565b62000254600080516020620069d18339815191523362000b30565b600054610100900460ff16620005ab5760405162461bcd60e51b815260206004820152602b6024820152600080516020620069f183398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200015a565b600160fb55565b61012e5463ffffffff9081169082168103620005cc575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a1291015b60405180910390a15050565b61012e5463ffffffff6401000000009091048116908216810362000649575050565b61012e805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb91016200061b565b61012e5463ffffffff6801000000000000000090910481169082168103620006d0575050565b61012e805463ffffffff60401b19166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce191016200061b565b61012e5463ffffffff600160a01b9091048116908216810362000756575050565b61012e805463ffffffff60a01b1916600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391016200061b565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103620007e0575050565b61012e805463ffffffff60601b19166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc84321132891016200061b565b61012e5463ffffffff600160801b909104811690821681036200086a575050565b61012e805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b91016200061b565b6000620008d78262000b40565b15620008e557506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200094a919062001003565b92915050565b610133546001600160801b0390811690821681036200096d575050565b61013380546001600160801b0319166001600160801b0384811691821792839055600160801b9092049091161115620009f85761010051620009d990620009d390620009c3906001600160a01b03163062000b68565b6001600160801b03851662000c04565b62000c1c565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd391016200061b565b6001600160a01b038216600090815261013260205260409020546001600160801b03908116908216810362000a6d57505050565b6001600160a01b0383166000818152610132602090815260409182902080546001600160801b0319166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910160405180910390a2505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000b3c828262000c8b565b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146200094a565b600062000b758362000b40565b1562000b8d57506001600160a01b038116316200094a565b826040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801562000bd7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bfd919062001028565b9392505050565b600081831062000c15578162000bfd565b5090919050565b60006001600160801b0382111562000c875760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b60648201526084016200015a565b5090565b62000c97828262000cb6565b600082815260976020526040902062000cb1908262000d5a565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1662000b3c5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000d163390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000bfd836001600160a01b038416600081815260018301602052604081205462000db4575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200094a565b5060006200094a565b6001600160a01b0381168114620000ba57600080fd5b60008060008060008060c0878903121562000ded57600080fd5b865162000dfa8162000dbd565b602088015190965062000e0d8162000dbd565b604088015190955062000e208162000dbd565b606088015190945062000e338162000dbd565b608088015190935062000e468162000dbd565b60a088015190925062000e598162000dbd565b809150509295509295509295565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ec4576001600160801b0382900482111562000ea85762000ea862000e67565b8085161562000eb657918102915b93841c939080029062000e82565b509250929050565b60008262000edd575060016200094a565b8162000eec575060006200094a565b816001811462000f05576002811462000f105762000f4b565b60019150506200094a565b60ff84111562000f245762000f2462000e67565b6001841b91506001600160801b0382111562000f445762000f4462000e67565b506200094a565b5060208310610133831016604e8410600b841016171562000f8a575081810a6001600160801b0381111562000f845762000f8462000e67565b6200094a565b62000f96838362000e7d565b6001600160801b0381900482111562000fb35762000fb362000e67565b029392505050565b600062000bfd60ff84166001600160801b03841662000ecc565b6001600160801b0381811683821602808216919082811462000ffb5762000ffb62000e67565b505092915050565b6000602082840312156200101657600080fd5b815160ff8116811462000bfd57600080fd5b6000602082840312156200103b57600080fd5b5051919050565b60805160a05160c05160e05161010051610120516157e1620011f0600039600081816104d60152818161102a015281816111030152818161319c0152818161329f015281816133370152818161380e01526139010152600081816103f001528181610918015281816110cc0152818161113c0152818161164b01528181611c5901528181611da50152818161247801528181612527015281816125e90152818161265e015281816126db01528181612c77015281816130dc015281816132fd0152818161340c01528181613471015281816134bc0152818161351d0152818161359d015281816136ac01528181613730015281816137be0152818161384701528181613938015281816139a3015281816139eb01528181614099015281816140e6015261410a01526000818161115e01528181613226015281816132c20152613869015260008181610c5401528181610db101528181610e1d0152818161181b0152611857015260008181610c7a01528181610ea201528181610f0e0152818161188a01526118c6015260008181610c2e01528181610d200152818161173c01526117a101526157e16000f3fe6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614ea6565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614ee8565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614f0e565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614f3c565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614f3c565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614ee8565b610b33565b34801561049757600080fd5b506103816104a6366004614fb1565b610b76565b3480156104b757600080fd5b5060405160028152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614ee8565b611370565b34801561054957600080fd5b506103816113ad565b34801561055e57600080fd5b5061057261056d36600461500a565b6114cd565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a536600461503f565b611588565b604051610323919061505c565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004615080565b6116d2565b34801561062f57600080fd5b5061031761063e366004614f3c565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b73660046150a2565b6116f1565b3480156106c857600080fd5b506103b36106d736600461503f565b611737565b3480156106e857600080fd5b506103176106f736600461503f565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614ee8565b611914565b34801561074257600080fd5b506103816107513660046150bd565b611957565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b5061057261078636600461500a565b611abb565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d236600461503f565b611b62565b3480156107e357600080fd5b506103816107f2366004615150565b611b89565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614f0e565b611bbd565b34801561083f57600080fd5b5061038161084e366004614ee8565b611bd4565b34801561085f57600080fd5b5061038161086e3660046150a2565b611c17565b34801561087f57600080fd5b5061038161088e366004614f3c565b611c7e565b34801561089f57600080fd5b506103816108ae36600461517e565b611ca3565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e436600461503f565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a136600461503f565b611d2a565b3480156109b257600080fd5b506103816109c1366004614ee8565b611d35565b6103816109d4366004615203565b611d78565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611e56565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff16610a6f81611f49565b610a7882611f83565b5050565b600082815260656020526040902060010154610a9781612022565b610aa1838361202c565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a78828261204e565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff16610b6d81611f49565b610a7882612070565b610b7e612109565b8181610b8a8282612162565b8260008167ffffffffffffffff811115610ba657610ba6615248565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed615248565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b87811015610fcf5760008c8c83818110610cbb57610cbb61525e565b9050602002016020810190610cd0919061503f565b905060008515610d9a576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8d9190615274565b610d9790826152a3565b90505b8415610e8b576000610dd56001600160a01b0384167f00000000000000000000000000000000000000000000000000000000000000006122ac565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e6357600080fd5b505af1158015610e77573d6000803e3d6000fd5b505050508082610e8791906152a3565b9150505b8315610f7c576000610ec66001600160a01b0384167f00000000000000000000000000000000000000000000000000000000000000006122ac565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610f5457600080fd5b505af1158015610f68573d6000803e3d6000fd5b505050508082610f7891906152a3565b9150505b80898481518110610f8f57610f8f61525e565b6020908102919091010152610fa88188620f4240612353565b888481518110610fba57610fba61525e565b60209081029190910101525050600101610c9f565b5060005b8781101561131d5760008c8c83818110610fef57610fef61525e565b9050602002016020810190611004919061503f565b9050600088838151811061101a5761101a61525e565b6020026020010151905061105a827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611066575050611315565b80158061108c57506001600160a01b038216600090815261012f602052604090205460ff165b15611098575050611315565b60008884815181106110ac576110ac61525e565b60200260200101519050600081836110c491906152b6565b90506110fc847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611221577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111a1576111836001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000008361242e565b8061012d600082825461119691906152a3565b909155506113109050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806111ff57506001600160a01b038416600090815261013260205260409020546001600160801b03166111f485612470565b6001600160801b0316105b8061120e575061120e846124e1565b1561121c5761121c826125ab565b611310565b600061122c85612470565b9050611256856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061129257506001600160a01b038516600090815261013260205260409020546001600160801b039081169061129090849084166152b6565b105b806112f057506001600160a01b0385166000908152610132602052604090205461012e546112db916001600160801b03169068010000000000000000900463ffffffff166152c9565b6001600160801b0316816001600160801b0316115b806112ff57506112ff856124e1565b1561130e5761130e858461273e565b505b505050505b600101610fd3565b5061135d338c8c808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250612839915050565b505050505050505050610a78600160fb55565b61139a7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b806113a4816128b1565b610a78826128f4565b600054610100900460ff16158080156113cd5750600054600160ff909116105b806113e75750303b1580156113e7575060005460ff166001145b6114595760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff19166001179055801561147c576000805461ff0019166101001790555b611484612960565b80156114ca576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826114d9816129e5565b60006114e485611588565b90506114ef81612a8f565b600061152761152283602001516001600160801b0316876001600160801b031685600001516001600160801b0316612353565b612ae7565b905061153286612470565b6001600160801b0316816001600160801b0316111561157d576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036115f6576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061160282426152f4565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f000000000000000000000000000000000000000000000000000000000000000016146116865761012e54600160a01b900463ffffffff166116a1565b61012e546c01000000000000000000000000900463ffffffff165b90506116be61152283600001516001600160801b03168584612b6a565b6001600160801b0316825250949350505050565b60008281526097602052604081206116ea9083612bf2565b9392505050565b61171b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b806001600160801b031661172e81611f49565b610a7882612bfe565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611819576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156117e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180c9190615274565b61181690826152a3565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316156118885761187b6001600160a01b0384167f00000000000000000000000000000000000000000000000000000000000000006122ac565b61188590826152a3565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316156118f7576118ea6001600160a01b0384167f00000000000000000000000000000000000000000000000000000000000000006122ac565b6118f490826152a3565b90505b61190a6001600160a01b038416306122ac565b6116ea90826152a3565b61193e7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff1661194e81611f49565b610a7882612d0b565b8261196181612da2565b858561196d8282612162565b611975612109565b61199f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b868481146119d9576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015611a4057611a38888888848181106119fa576119fa61525e565b905060200201358c8c85818110611a1357611a1361525e565b9050602002016020810190611a28919061503f565b6001600160a01b0316919061242e565b6001016119dc565b50866001600160a01b0316336001600160a01b03168a8a604051611a65929190615311565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b558989604051611a9e929190615353565b60405180910390a450611ab1600160fb55565b5050505050505050565b600082611ac7816129e5565b611ad084612470565b6001600160801b0316836001600160801b03161115611b1b576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611b2685611588565b9050611b3181612a8f565b61157d61152282600001516001600160801b0316866001600160801b031684602001516001600160801b0316612de2565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611bb37f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b610a788282612e39565b6000818152609760205260408120610a2f90612ec5565b611bfe7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff16611c0e81611f49565b610a7882612ecf565b611c417f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b806001600160801b0316611c5481611f49565b610a787f000000000000000000000000000000000000000000000000000000000000000083612f70565b600082815260656020526040902060010154611c9981612022565b610aa1838361204e565b60c954600090611cb89061ffff1660016153a5565b90506002848015611cd157508061ffff168261ffff1614155b15611d08576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611d11578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f82612470565b611d5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff16611d6f81611f49565b610a788261302b565b611d80612109565b82611d8a816129e5565b826001600160801b0316611d9d81611f49565b6000611dd5867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611deb57611de485856130d4565b9050611df9565b611df6868686613604565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036114ca576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611fa3575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6114ca8133613a50565b6120368282613ac5565b6000828152609760205260409020610aa19082613b67565b6120588282613b7c565b6000828152609760205260409020610aa19082613bff565b61012e5463ffffffff64010000000090910481169082168103612091575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101612016565b600260fb540361215b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b80600081900361219e576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156122a65760008484838181106121bd576121bd61525e565b90506020020160208101906121d2919061503f565b90506001600160a01b038116612214576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b8381101561229c5761225d828787848181106122375761223761525e565b905060200201602081019061224c919061503f565b6001600160a01b0390811691161490565b15612294576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612219565b50506001016121a1565b50505050565b60006122b783613c14565b156122cd57506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801561232f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ea9190615274565b60008060006123628686613c3b565b91509150816000036123875783818161237d5761237d6153c0565b04925050506116ea565b8382106123a757604051631a93c68960e11b815260040160405180910390fd5b60006123b4878787613c76565b90506000806123c4858585613c91565b91509150816000036123ec578681816123df576123df6153c0565b04955050505050506116ea565b60008781038816906123ff848484613cc1565b9050600061241b838b81612415576124156153c0565b04613cfe565b919091029b9a5050505050505050505050565b8060000361243b57505050565b61244483613c14565b1561245c57610aa16001600160a01b03831682613d1f565b610aa16001600160a01b0384168383613e38565b60006124a8827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b156124c657505061013354600160801b90046001600160801b031690565b610a2f6115226001600160a01b038416306122ac565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff168082036125115750600092915050565b600061251d82426152f4565b90506000612557857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6125715761012e54600160a01b900463ffffffff1661258c565b61012e546c01000000000000000000000000900463ffffffff165b9050608061259a82846153d6565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b02939094169290921790925590506126a0611522836126846001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016306122ac565b61268e91906152b6565b610133546001600160801b0316613ee1565b61013380546001600160801b03928316600160801b02921691909117905561012e546126d99063ffffffff600160a01b9091041661302b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b9546682604051612732919061505c565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b02939094169290921790925590506127f38360026127e4856127da6001600160a01b038516306122ac565b61152291906152b6565b6127ee91906153f9565b612f70565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b954668260405161282c919061505c565b60405180910390a2505050565b815160005b81811015611d2357600084828151811061285a5761285a61525e565b6020026020010151905060008483815181106128785761287861525e565b602002602001015190506128a08782846001600160a01b031661242e9092919063ffffffff16565b505060010161283e565b600160fb55565b620f424063ffffffff821611156114ca576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff908116908216810361290d575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101612016565b600054610100900460ff166129cb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6129d3613ef7565b6129db613f72565b6129e3613fe5565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff16612a3b576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156114ca576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b03161580612ab1575060208101516001600160801b0316155b156114ca576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b03821115612b665760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b600080612b7783856153d6565b63ffffffff1690506000612b8b8486615413565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612bbd8261414d565b9050612be6888260200151866002612bd59190615618565b8451612be19190615624565b612353565b98975050505050505050565b60006116ea838361452b565b610133546001600160801b039081169082168103612c1a575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612ccb57612cac611522612c9d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016306122ac565b846001600160801b0316613ee1565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101612016565b61012e5463ffffffff600160801b90910481169082168103612d2b575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101612016565b6001600160a01b0381166114ca576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612df0858585612353565b90506000612dff868686613c76565b1115612e31576000198110612e2757604051631a93c68960e11b815260040160405180910390fd5b60010190506116ea565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612e6657505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff910161282c565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612ef4575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101612016565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612fa357505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910161282c565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103613054575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101612016565b6000806131017f000000000000000000000000000000000000000000000000000000000000000085611abb565b9050806001600160801b0316600003613146576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b03161115613192576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0361325a57806001600160801b0316341015613219576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132556001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613d1f565b6132f0565b3415613292576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132f06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b038516614555565b61332d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b03871661242e565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156133815750806001600160801b031634115b156133a3576133a361339c6001600160801b038316346152b6565b3390613d1f565b806001600160801b031661012d60008282546133bf91906152a3565b909155505061013380548591906010906133ea908490600160801b90046001600160801b031661563b565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506116ea5761349761152261268e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016306122ac565b61013380546001600160801b03928316600160801b02921691909117905560006134e07f0000000000000000000000000000000000000000000000000000000000000000611588565b61012e548151919250640100000000900463ffffffff169082906135059083906152c9565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461359b9350919091041661302b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b826040516135f4919061505c565b60405180910390a2509392505050565b6000806136118585611abb565b9050806001600160801b0316600003613656576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b031611156136a2576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156136ef5750600034115b15613726576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14801561377a5750806001600160801b031634105b156137b1576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6137ef6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b038516614555565b61380c6001600160a01b038616336001600160801b03871661457f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166138b9576138976001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b03841661242e565b806001600160801b031661012d60008282546138b391906152a3565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b03166138e586612470565b6001600160801b031610156138ff576138ff85600061273e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316158015906139d2575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546139959168010000000000000000900463ffffffff16906001600160801b03166153f9565b6001600160801b03166139c77f0000000000000000000000000000000000000000000000000000000000000000612470565b6001600160801b0316105b156139e1576139e160006125ab565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee148015613a355750806001600160801b031634115b15612e3157612e3161339c6001600160801b038316346152b6565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a7857613a83816145d0565b613a8e8360206145e2565b604051602001613a9f92919061567f565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615700565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613b233390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006116ea836001600160a01b03841661480b565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006116ea836001600160a01b03841661485a565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613c4a858561494d565b9050848402808210613c63579081900392509050613c6f565b60018183030393509150505b9250929050565b60008180613c8657613c866153c0565b838509949350505050565b600080828410613ca75750839050818303613cb9565b613cb26001866152b6565b9150508183035b935093915050565b600080613cdf8380830381613cd857613cd86153c0565b0460010190565b9050828481613cf057613cf06153c0565b048186021795945050505050565b60006001815b60088110156115815783820260020382029150600101613d04565b80471015613d6f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613dbc576040519150601f19603f3d011682016040523d82523d6000602084013e613dc1565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261495c565b6000818310613ef057816116ea565b5090919050565b600054610100900460ff16613f625760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613f6a614a44565b6129e3614aaf565b600054610100900460ff16613fdd5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6129e3614b7c565b600054610100900460ff166140505760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61405b6113886128f4565b6140656002612070565b61406f6004612ecf565b61407a61a8c0611f83565b61408561a8c061302b565b614091620d2f00612d0b565b6140e16140c67f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614be7565b6140d190600a615733565b6140dc9060646152c9565b612bfe565b6129e37f00000000000000000000000000000000000000000000000000000000000000006141377f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614be7565b61414290600a615733565b6127ee90600a6152c9565b604080518082019091526000808252602082015260006141866f58b90bfbe8e7bcd5e4f1d9cc01f97b5784600001518560200151612353565b90506000808070080000000000000000000000000000000084106141bd57604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f100000000000000000000000000000008416156143a25770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f200000000000000000000000000000008416156143e4577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f40000000000000000000000000000000841615614425576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b841615614459576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b84161561448d576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b7002000000000000000000000000000000008416156144cd576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b70040000000000000000000000000000000084161561450b576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106145425761454261525e565b9060005260206000200154905092915050565b801580614566575061456684613c14565b6122a6576122a66001600160a01b038516848484614c61565b8060000361458c57505050565b61459583613c14565b1561245c576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156122a6573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b606060006145f1836002615624565b6145fc9060026152a3565b67ffffffffffffffff81111561461457614614615248565b6040519080825280601f01601f19166020018201604052801561463e576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106146755761467561525e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106146d8576146d861525e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000614714846002615624565b61471f9060016152a3565b90505b60018111156147bc577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106147605761476061525e565b1a60f81b8282815181106147765761477661525e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936147b58161574b565b9050614722565b5083156116ea5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b600081815260018301602052604081205461485257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b6000818152600183016020526040812054801561494357600061487e6001836152b6565b8554909150600090614892906001906152b6565b90508181146148f75760008660000182815481106148b2576148b261525e565b90600052602060002001549050808760000184815481106148d5576148d561525e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061490857614908615762565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b60006149b1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614cb29092919063ffffffff16565b90508051600014806149d25750808060200190518101906149d29190615778565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff166129e35760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff16614b1a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff19166002179055614b527f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614cc1565b6129e37f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614d0c565b600054610100900460ff166128aa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614bf282613c14565b15614bff57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614c3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190615795565b6040516001600160a01b03808516602483015283166044820152606481018290526122a69085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613e7d565b6060612e318484600085614d16565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a78828261202c565b606082471015614d8e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614daa91906157b8565b60006040518083038185875af1925050503d8060008114614de7576040519150601f19603f3d011682016040523d82523d6000602084013e614dec565b606091505b5091509150614dfd87838387614e08565b979650505050505050565b60608315614e77578251600003614e70576001600160a01b0385163b614e705760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612e31565b612e318383815115614e8c5781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615700565b600060208284031215614eb857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146116ea57600080fd5b600060208284031215614efa57600080fd5b813563ffffffff811681146116ea57600080fd5b600060208284031215614f2057600080fd5b5035919050565b6001600160a01b03811681146114ca57600080fd5b60008060408385031215614f4f57600080fd5b823591506020830135614f6181614f27565b809150509250929050565b60008083601f840112614f7e57600080fd5b50813567ffffffffffffffff811115614f9657600080fd5b6020830191508360208260051b8501011115613c6f57600080fd5b60008060208385031215614fc457600080fd5b823567ffffffffffffffff811115614fdb57600080fd5b614fe785828601614f6c565b90969095509350505050565b80356001600160801b03811681146124dc57600080fd5b6000806040838503121561501d57600080fd5b823561502881614f27565b915061503660208401614ff3565b90509250929050565b60006020828403121561505157600080fd5b81356116ea81614f27565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b6000806040838503121561509357600080fd5b50508035926020909101359150565b6000602082840312156150b457600080fd5b6116ea82614ff3565b6000806000806000606086880312156150d557600080fd5b853567ffffffffffffffff808211156150ed57600080fd5b6150f989838a01614f6c565b90975095506020880135915061510e82614f27565b9093506040870135908082111561512457600080fd5b5061513188828901614f6c565b969995985093965092949392505050565b80151581146114ca57600080fd5b6000806040838503121561516357600080fd5b823561516e81614f27565b91506020830135614f6181615142565b60008060006040848603121561519357600080fd5b833561519e81615142565b9250602084013567ffffffffffffffff808211156151bb57600080fd5b818601915086601f8301126151cf57600080fd5b8135818111156151de57600080fd5b8760208285010111156151f057600080fd5b6020830194508093505050509250925092565b60008060006060848603121561521857600080fd5b833561522381614f27565b925061523160208501614ff3565b915061523f60408501614ff3565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561528657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f61528d565b81810381811115610a2f57610a2f61528d565b6001600160801b038181168382160280821691908281146152ec576152ec61528d565b505092915050565b63ffffffff8281168282160390808211156115815761158161528d565b60008184825b8581101561534857813561532a81614f27565b6001600160a01b031683526020928301929190910190600101615317565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561538c57600080fd5b8260051b80856040850137919091016040019392505050565b61ffff8181168382160190808211156115815761158161528d565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff808416806153ed576153ed6153c0565b92169190910492915050565b60006001600160801b03808416806153ed576153ed6153c0565b600063ffffffff8084168061542a5761542a6153c0565b92169190910692915050565b600181815b808511156154715781600019048211156154575761545761528d565b8085161561546457918102915b93841c939080029061543b565b509250929050565b600181815b8085111561547157816001600160801b030482111561549f5761549f61528d565b808516156154ac57918102915b93841c939080029061547e565b6000826154c857506001610a2f565b816154d557506000610a2f565b81600181146154eb57600281146154f557615511565b6001915050610a2f565b60ff8411156155065761550661528d565b50506001821b610a2f565b5060208310610133831016604e8410600b8410161715615534575081810a610a2f565b61553e8383615436565b80600019048211156155525761555261528d565b029392505050565b60008261556957506001610a2f565b8161557657506000610a2f565b81600181146154eb57600281036155bb5760ff8411156155985761559861528d565b6001841b91506001600160801b038211156155b5576155b561528d565b50610a2f565b5060208310610133831016604e8410600b84101617156155f5575081810a6001600160801b038111156155f0576155f061528d565b610a2f565b6155ff8383615479565b806001600160801b03048211156155525761555261528d565b60006116ea83836154b9565b8082028115828204841417610a2f57610a2f61528d565b6001600160801b038281168282160390808211156115815761158161528d565b60005b8381101561567657818101518382015260200161565e565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516156b781601785016020880161565b565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516156f481602884016020880161565b565b01602801949350505050565b602081526000825180602084015261571f81604085016020870161565b565b601f01601f19169190910160400192915050565b60006116ea60ff84166001600160801b03841661555a565b60008161575a5761575a61528d565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561578a57600080fd5b81516116ea81615142565b6000602082840312156157a757600080fd5b815160ff811681146116ea57600080fd5b600082516157ca81846020870161565b565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614ea6565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614ee8565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614f0e565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614f3c565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614f3c565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614ee8565b610b33565b34801561049757600080fd5b506103816104a6366004614fb1565b610b76565b3480156104b757600080fd5b5060405160028152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614ee8565b611370565b34801561054957600080fd5b506103816113ad565b34801561055e57600080fd5b5061057261056d36600461500a565b6114cd565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a536600461503f565b611588565b604051610323919061505c565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004615080565b6116d2565b34801561062f57600080fd5b5061031761063e366004614f3c565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b73660046150a2565b6116f1565b3480156106c857600080fd5b506103b36106d736600461503f565b611737565b3480156106e857600080fd5b506103176106f736600461503f565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614ee8565b611914565b34801561074257600080fd5b506103816107513660046150bd565b611957565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b5061057261078636600461500a565b611abb565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d236600461503f565b611b62565b3480156107e357600080fd5b506103816107f2366004615150565b611b89565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614f0e565b611bbd565b34801561083f57600080fd5b5061038161084e366004614ee8565b611bd4565b34801561085f57600080fd5b5061038161086e3660046150a2565b611c17565b34801561087f57600080fd5b5061038161088e366004614f3c565b611c7e565b34801561089f57600080fd5b506103816108ae36600461517e565b611ca3565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e436600461503f565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a136600461503f565b611d2a565b3480156109b257600080fd5b506103816109c1366004614ee8565b611d35565b6103816109d4366004615203565b611d78565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611e56565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff16610a6f81611f49565b610a7882611f83565b5050565b600082815260656020526040902060010154610a9781612022565b610aa1838361202c565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a78828261204e565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff16610b6d81611f49565b610a7882612070565b610b7e612109565b8181610b8a8282612162565b8260008167ffffffffffffffff811115610ba657610ba6615248565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed615248565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b87811015610fcf5760008c8c83818110610cbb57610cbb61525e565b9050602002016020810190610cd0919061503f565b905060008515610d9a576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8d9190615274565b610d9790826152a3565b90505b8415610e8b576000610dd56001600160a01b0384167f00000000000000000000000000000000000000000000000000000000000000006122ac565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e6357600080fd5b505af1158015610e77573d6000803e3d6000fd5b505050508082610e8791906152a3565b9150505b8315610f7c576000610ec66001600160a01b0384167f00000000000000000000000000000000000000000000000000000000000000006122ac565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610f5457600080fd5b505af1158015610f68573d6000803e3d6000fd5b505050508082610f7891906152a3565b9150505b80898481518110610f8f57610f8f61525e565b6020908102919091010152610fa88188620f4240612353565b888481518110610fba57610fba61525e565b60209081029190910101525050600101610c9f565b5060005b8781101561131d5760008c8c83818110610fef57610fef61525e565b9050602002016020810190611004919061503f565b9050600088838151811061101a5761101a61525e565b6020026020010151905061105a827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611066575050611315565b80158061108c57506001600160a01b038216600090815261012f602052604090205460ff165b15611098575050611315565b60008884815181106110ac576110ac61525e565b60200260200101519050600081836110c491906152b6565b90506110fc847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611221577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111a1576111836001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000008361242e565b8061012d600082825461119691906152a3565b909155506113109050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806111ff57506001600160a01b038416600090815261013260205260409020546001600160801b03166111f485612470565b6001600160801b0316105b8061120e575061120e846124e1565b1561121c5761121c826125ab565b611310565b600061122c85612470565b9050611256856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061129257506001600160a01b038516600090815261013260205260409020546001600160801b039081169061129090849084166152b6565b105b806112f057506001600160a01b0385166000908152610132602052604090205461012e546112db916001600160801b03169068010000000000000000900463ffffffff166152c9565b6001600160801b0316816001600160801b0316115b806112ff57506112ff856124e1565b1561130e5761130e858461273e565b505b505050505b600101610fd3565b5061135d338c8c808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250612839915050565b505050505050505050610a78600160fb55565b61139a7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b806113a4816128b1565b610a78826128f4565b600054610100900460ff16158080156113cd5750600054600160ff909116105b806113e75750303b1580156113e7575060005460ff166001145b6114595760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff19166001179055801561147c576000805461ff0019166101001790555b611484612960565b80156114ca576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826114d9816129e5565b60006114e485611588565b90506114ef81612a8f565b600061152761152283602001516001600160801b0316876001600160801b031685600001516001600160801b0316612353565b612ae7565b905061153286612470565b6001600160801b0316816001600160801b0316111561157d576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036115f6576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061160282426152f4565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f000000000000000000000000000000000000000000000000000000000000000016146116865761012e54600160a01b900463ffffffff166116a1565b61012e546c01000000000000000000000000900463ffffffff165b90506116be61152283600001516001600160801b03168584612b6a565b6001600160801b0316825250949350505050565b60008281526097602052604081206116ea9083612bf2565b9392505050565b61171b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b806001600160801b031661172e81611f49565b610a7882612bfe565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611819576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156117e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180c9190615274565b61181690826152a3565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316156118885761187b6001600160a01b0384167f00000000000000000000000000000000000000000000000000000000000000006122ac565b61188590826152a3565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316156118f7576118ea6001600160a01b0384167f00000000000000000000000000000000000000000000000000000000000000006122ac565b6118f490826152a3565b90505b61190a6001600160a01b038416306122ac565b6116ea90826152a3565b61193e7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff1661194e81611f49565b610a7882612d0b565b8261196181612da2565b858561196d8282612162565b611975612109565b61199f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b868481146119d9576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015611a4057611a38888888848181106119fa576119fa61525e565b905060200201358c8c85818110611a1357611a1361525e565b9050602002016020810190611a28919061503f565b6001600160a01b0316919061242e565b6001016119dc565b50866001600160a01b0316336001600160a01b03168a8a604051611a65929190615311565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b558989604051611a9e929190615353565b60405180910390a450611ab1600160fb55565b5050505050505050565b600082611ac7816129e5565b611ad084612470565b6001600160801b0316836001600160801b03161115611b1b576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611b2685611588565b9050611b3181612a8f565b61157d61152282600001516001600160801b0316866001600160801b031684602001516001600160801b0316612de2565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611bb37f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b610a788282612e39565b6000818152609760205260408120610a2f90612ec5565b611bfe7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff16611c0e81611f49565b610a7882612ecf565b611c417f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b806001600160801b0316611c5481611f49565b610a787f000000000000000000000000000000000000000000000000000000000000000083612f70565b600082815260656020526040902060010154611c9981612022565b610aa1838361204e565b60c954600090611cb89061ffff1660016153a5565b90506002848015611cd157508061ffff168261ffff1614155b15611d08576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611d11578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f82612470565b611d5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611eed565b8063ffffffff16611d6f81611f49565b610a788261302b565b611d80612109565b82611d8a816129e5565b826001600160801b0316611d9d81611f49565b6000611dd5867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611deb57611de485856130d4565b9050611df9565b611df6868686613604565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036114ca576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611fa3575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6114ca8133613a50565b6120368282613ac5565b6000828152609760205260409020610aa19082613b67565b6120588282613b7c565b6000828152609760205260409020610aa19082613bff565b61012e5463ffffffff64010000000090910481169082168103612091575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101612016565b600260fb540361215b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b80600081900361219e576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156122a65760008484838181106121bd576121bd61525e565b90506020020160208101906121d2919061503f565b90506001600160a01b038116612214576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b8381101561229c5761225d828787848181106122375761223761525e565b905060200201602081019061224c919061503f565b6001600160a01b0390811691161490565b15612294576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612219565b50506001016121a1565b50505050565b60006122b783613c14565b156122cd57506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801561232f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ea9190615274565b60008060006123628686613c3b565b91509150816000036123875783818161237d5761237d6153c0565b04925050506116ea565b8382106123a757604051631a93c68960e11b815260040160405180910390fd5b60006123b4878787613c76565b90506000806123c4858585613c91565b91509150816000036123ec578681816123df576123df6153c0565b04955050505050506116ea565b60008781038816906123ff848484613cc1565b9050600061241b838b81612415576124156153c0565b04613cfe565b919091029b9a5050505050505050505050565b8060000361243b57505050565b61244483613c14565b1561245c57610aa16001600160a01b03831682613d1f565b610aa16001600160a01b0384168383613e38565b60006124a8827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b156124c657505061013354600160801b90046001600160801b031690565b610a2f6115226001600160a01b038416306122ac565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff168082036125115750600092915050565b600061251d82426152f4565b90506000612557857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6125715761012e54600160a01b900463ffffffff1661258c565b61012e546c01000000000000000000000000900463ffffffff165b9050608061259a82846153d6565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b02939094169290921790925590506126a0611522836126846001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016306122ac565b61268e91906152b6565b610133546001600160801b0316613ee1565b61013380546001600160801b03928316600160801b02921691909117905561012e546126d99063ffffffff600160a01b9091041661302b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b9546682604051612732919061505c565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b02939094169290921790925590506127f38360026127e4856127da6001600160a01b038516306122ac565b61152291906152b6565b6127ee91906153f9565b612f70565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b954668260405161282c919061505c565b60405180910390a2505050565b815160005b81811015611d2357600084828151811061285a5761285a61525e565b6020026020010151905060008483815181106128785761287861525e565b602002602001015190506128a08782846001600160a01b031661242e9092919063ffffffff16565b505060010161283e565b600160fb55565b620f424063ffffffff821611156114ca576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff908116908216810361290d575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101612016565b600054610100900460ff166129cb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6129d3613ef7565b6129db613f72565b6129e3613fe5565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff16612a3b576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156114ca576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b03161580612ab1575060208101516001600160801b0316155b156114ca576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b03821115612b665760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b600080612b7783856153d6565b63ffffffff1690506000612b8b8486615413565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612bbd8261414d565b9050612be6888260200151866002612bd59190615618565b8451612be19190615624565b612353565b98975050505050505050565b60006116ea838361452b565b610133546001600160801b039081169082168103612c1a575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612ccb57612cac611522612c9d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016306122ac565b846001600160801b0316613ee1565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101612016565b61012e5463ffffffff600160801b90910481169082168103612d2b575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101612016565b6001600160a01b0381166114ca576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612df0858585612353565b90506000612dff868686613c76565b1115612e31576000198110612e2757604051631a93c68960e11b815260040160405180910390fd5b60010190506116ea565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612e6657505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff910161282c565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612ef4575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101612016565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612fa357505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910161282c565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103613054575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101612016565b6000806131017f000000000000000000000000000000000000000000000000000000000000000085611abb565b9050806001600160801b0316600003613146576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b03161115613192576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0361325a57806001600160801b0316341015613219576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132556001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613d1f565b6132f0565b3415613292576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132f06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b038516614555565b61332d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b03871661242e565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156133815750806001600160801b031634115b156133a3576133a361339c6001600160801b038316346152b6565b3390613d1f565b806001600160801b031661012d60008282546133bf91906152a3565b909155505061013380548591906010906133ea908490600160801b90046001600160801b031661563b565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506116ea5761349761152261268e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016306122ac565b61013380546001600160801b03928316600160801b02921691909117905560006134e07f0000000000000000000000000000000000000000000000000000000000000000611588565b61012e548151919250640100000000900463ffffffff169082906135059083906152c9565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461359b9350919091041661302b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b826040516135f4919061505c565b60405180910390a2509392505050565b6000806136118585611abb565b9050806001600160801b0316600003613656576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b031611156136a2576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156136ef5750600034115b15613726576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14801561377a5750806001600160801b031634105b156137b1576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6137ef6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b038516614555565b61380c6001600160a01b038616336001600160801b03871661457f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166138b9576138976001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b03841661242e565b806001600160801b031661012d60008282546138b391906152a3565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b03166138e586612470565b6001600160801b031610156138ff576138ff85600061273e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316158015906139d2575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546139959168010000000000000000900463ffffffff16906001600160801b03166153f9565b6001600160801b03166139c77f0000000000000000000000000000000000000000000000000000000000000000612470565b6001600160801b0316105b156139e1576139e160006125ab565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee148015613a355750806001600160801b031634115b15612e3157612e3161339c6001600160801b038316346152b6565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a7857613a83816145d0565b613a8e8360206145e2565b604051602001613a9f92919061567f565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615700565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613b233390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006116ea836001600160a01b03841661480b565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006116ea836001600160a01b03841661485a565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613c4a858561494d565b9050848402808210613c63579081900392509050613c6f565b60018183030393509150505b9250929050565b60008180613c8657613c866153c0565b838509949350505050565b600080828410613ca75750839050818303613cb9565b613cb26001866152b6565b9150508183035b935093915050565b600080613cdf8380830381613cd857613cd86153c0565b0460010190565b9050828481613cf057613cf06153c0565b048186021795945050505050565b60006001815b60088110156115815783820260020382029150600101613d04565b80471015613d6f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613dbc576040519150601f19603f3d011682016040523d82523d6000602084013e613dc1565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261495c565b6000818310613ef057816116ea565b5090919050565b600054610100900460ff16613f625760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613f6a614a44565b6129e3614aaf565b600054610100900460ff16613fdd5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6129e3614b7c565b600054610100900460ff166140505760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61405b6113886128f4565b6140656002612070565b61406f6004612ecf565b61407a61a8c0611f83565b61408561a8c061302b565b614091620d2f00612d0b565b6140e16140c67f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614be7565b6140d190600a615733565b6140dc9060646152c9565b612bfe565b6129e37f00000000000000000000000000000000000000000000000000000000000000006141377f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614be7565b61414290600a615733565b6127ee90600a6152c9565b604080518082019091526000808252602082015260006141866f58b90bfbe8e7bcd5e4f1d9cc01f97b5784600001518560200151612353565b90506000808070080000000000000000000000000000000084106141bd57604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f100000000000000000000000000000008416156143a25770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f200000000000000000000000000000008416156143e4577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f40000000000000000000000000000000841615614425576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b841615614459576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b84161561448d576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b7002000000000000000000000000000000008416156144cd576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b70040000000000000000000000000000000084161561450b576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106145425761454261525e565b9060005260206000200154905092915050565b801580614566575061456684613c14565b6122a6576122a66001600160a01b038516848484614c61565b8060000361458c57505050565b61459583613c14565b1561245c576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156122a6573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b606060006145f1836002615624565b6145fc9060026152a3565b67ffffffffffffffff81111561461457614614615248565b6040519080825280601f01601f19166020018201604052801561463e576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106146755761467561525e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106146d8576146d861525e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000614714846002615624565b61471f9060016152a3565b90505b60018111156147bc577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106147605761476061525e565b1a60f81b8282815181106147765761477661525e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936147b58161574b565b9050614722565b5083156116ea5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b600081815260018301602052604081205461485257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b6000818152600183016020526040812054801561494357600061487e6001836152b6565b8554909150600090614892906001906152b6565b90508181146148f75760008660000182815481106148b2576148b261525e565b90600052602060002001549050808760000184815481106148d5576148d561525e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061490857614908615762565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b60006149b1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614cb29092919063ffffffff16565b90508051600014806149d25750808060200190518101906149d29190615778565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff166129e35760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff16614b1a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff19166002179055614b527f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614cc1565b6129e37f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614d0c565b600054610100900460ff166128aa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614bf282613c14565b15614bff57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614c3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190615795565b6040516001600160a01b03808516602483015283166044820152606481018290526122a69085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613e7d565b6060612e318484600085614d16565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a78828261202c565b606082471015614d8e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614daa91906157b8565b60006040518083038185875af1925050503d8060008114614de7576040519150601f19603f3d011682016040523d82523d6000602084013e614dec565b606091505b5091509150614dfd87838387614e08565b979650505050505050565b60608315614e77578251600003614e70576001600160a01b0385163b614e705760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612e31565b612e318383815115614e8c5781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615700565b600060208284031215614eb857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146116ea57600080fd5b600060208284031215614efa57600080fd5b813563ffffffff811681146116ea57600080fd5b600060208284031215614f2057600080fd5b5035919050565b6001600160a01b03811681146114ca57600080fd5b60008060408385031215614f4f57600080fd5b823591506020830135614f6181614f27565b809150509250929050565b60008083601f840112614f7e57600080fd5b50813567ffffffffffffffff811115614f9657600080fd5b6020830191508360208260051b8501011115613c6f57600080fd5b60008060208385031215614fc457600080fd5b823567ffffffffffffffff811115614fdb57600080fd5b614fe785828601614f6c565b90969095509350505050565b80356001600160801b03811681146124dc57600080fd5b6000806040838503121561501d57600080fd5b823561502881614f27565b915061503660208401614ff3565b90509250929050565b60006020828403121561505157600080fd5b81356116ea81614f27565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b6000806040838503121561509357600080fd5b50508035926020909101359150565b6000602082840312156150b457600080fd5b6116ea82614ff3565b6000806000806000606086880312156150d557600080fd5b853567ffffffffffffffff808211156150ed57600080fd5b6150f989838a01614f6c565b90975095506020880135915061510e82614f27565b9093506040870135908082111561512457600080fd5b5061513188828901614f6c565b969995985093965092949392505050565b80151581146114ca57600080fd5b6000806040838503121561516357600080fd5b823561516e81614f27565b91506020830135614f6181615142565b60008060006040848603121561519357600080fd5b833561519e81615142565b9250602084013567ffffffffffffffff808211156151bb57600080fd5b818601915086601f8301126151cf57600080fd5b8135818111156151de57600080fd5b8760208285010111156151f057600080fd5b6020830194508093505050509250925092565b60008060006060848603121561521857600080fd5b833561522381614f27565b925061523160208501614ff3565b915061523f60408501614ff3565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561528657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f61528d565b81810381811115610a2f57610a2f61528d565b6001600160801b038181168382160280821691908281146152ec576152ec61528d565b505092915050565b63ffffffff8281168282160390808211156115815761158161528d565b60008184825b8581101561534857813561532a81614f27565b6001600160a01b031683526020928301929190910190600101615317565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561538c57600080fd5b8260051b80856040850137919091016040019392505050565b61ffff8181168382160190808211156115815761158161528d565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff808416806153ed576153ed6153c0565b92169190910492915050565b60006001600160801b03808416806153ed576153ed6153c0565b600063ffffffff8084168061542a5761542a6153c0565b92169190910692915050565b600181815b808511156154715781600019048211156154575761545761528d565b8085161561546457918102915b93841c939080029061543b565b509250929050565b600181815b8085111561547157816001600160801b030482111561549f5761549f61528d565b808516156154ac57918102915b93841c939080029061547e565b6000826154c857506001610a2f565b816154d557506000610a2f565b81600181146154eb57600281146154f557615511565b6001915050610a2f565b60ff8411156155065761550661528d565b50506001821b610a2f565b5060208310610133831016604e8410600b8410161715615534575081810a610a2f565b61553e8383615436565b80600019048211156155525761555261528d565b029392505050565b60008261556957506001610a2f565b8161557657506000610a2f565b81600181146154eb57600281036155bb5760ff8411156155985761559861528d565b6001841b91506001600160801b038211156155b5576155b561528d565b50610a2f565b5060208310610133831016604e8410600b84101617156155f5575081810a6001600160801b038111156155f0576155f061528d565b610a2f565b6155ff8383615479565b806001600160801b03048211156155525761555261528d565b60006116ea83836154b9565b8082028115828204841417610a2f57610a2f61528d565b6001600160801b038281168282160390808211156115815761158161528d565b60005b8381101561567657818101518382015260200161565e565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516156b781601785016020880161565b565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516156f481602884016020880161565b565b01602801949350505050565b602081526000825180602084015261571f81604085016020870161565b565b601f01601f19169190910160400192915050565b60006116ea60ff84166001600160801b03841661555a565b60008161575a5761575a61528d565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561578a57600080fd5b81516116ea81615142565b6000602082840312156157a757600080fd5b815160ff811681146116ea57600080fd5b600082516157ca81846020870161565b565b919091019291505056fea164736f6c6343000813000a", + "numDeployments": 3, + "solcInputHash": "2dd0095b2cdd7d4dbea7e28972cf9b6c", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ICarbonController\",\"name\":\"carbonController\",\"type\":\"address\"},{\"internalType\":\"contract IVault\",\"name\":\"vault\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetTokenInit\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"finalTargetTokenInit\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GreaterThanMaxInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientAmountForTrading\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientNativeTokenSent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAmountLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrade\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairDisabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TradingDisabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnnecessaryNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValue\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"prevTargetTokenSaleAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newTargetTokenSaleAmount\",\"type\":\"uint128\"}],\"name\":\"MaxTargetTokenSaleAmountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevMinTokenSaleAmountMultiplier\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newMinTokenSaleAmountMultiplier\",\"type\":\"uint32\"}],\"name\":\"MinTokenSaleAmountMultiplierUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"prevMinTokenSaleAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newMinTokenSaleAmount\",\"type\":\"uint128\"}],\"name\":\"MinTokenSaleAmountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"prevStatus\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"newStatus\",\"type\":\"bool\"}],\"name\":\"PairDisabledStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevPriceDecayHalfLife\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"PriceDecayHalfLifeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevPriceResetMultiplier\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newPriceResetMultiplier\",\"type\":\"uint32\"}],\"name\":\"PriceResetMultiplierUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"struct ICarbonVortex.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"name\":\"PriceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevRewardsPPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newRewardsPPM\",\"type\":\"uint32\"}],\"name\":\"RewardsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevPriceDecayHalfLife\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"TargetTokenPriceDecayHalfLifeOnResetUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevPriceDecayHalfLife\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"TargetTokenPriceDecayHalfLifeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"name\":\"TokenTraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"struct ICarbonVortex.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"name\":\"TradingReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prevTransferAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTransferAddress\",\"type\":\"address\"}],\"name\":\"TransferAddressUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"amountAvailableForTrading\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"availableTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"name\":\"disablePair\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"name\":\"expectedTradeInput\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"}],\"name\":\"expectedTradeReturn\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalTargetToken\",\"outputs\":[{\"internalType\":\"Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"transferAddressInit\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTargetTokenSaleAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"minTokenSaleAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTokenSaleAmountMultiplier\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"pairDisabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"checkVersion\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceDecayHalfLife\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceResetMultiplier\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsPPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newMaxTargetTokenSaleAmount\",\"type\":\"uint128\"}],\"name\":\"setMaxTargetTokenSaleAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newMinTargetTokenSaleAmount\",\"type\":\"uint128\"}],\"name\":\"setMinTargetTokenSaleAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newMinTokenSaleAmountMultiplier\",\"type\":\"uint32\"}],\"name\":\"setMinTokenSaleAmountMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"setPriceDecayHalfLife\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newPriceResetMultiplier\",\"type\":\"uint32\"}],\"name\":\"setPriceResetMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newRewardsPPM\",\"type\":\"uint32\"}],\"name\":\"setRewardsPPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"setTargetTokenPriceDecayHalfLife\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"setTargetTokenPriceDecayHalfLifeOnReset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTransferAddress\",\"type\":\"address\"}],\"name\":\"setTransferAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetToken\",\"outputs\":[{\"internalType\":\"Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetTokenPriceDecayHalfLife\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetTokenPriceDecayHalfLifeOnReset\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetTokenSaleAmount\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"initial\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"current\",\"type\":\"uint128\"}],\"internalType\":\"struct ICarbonVortex.SaleAmount\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"tokenPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"internalType\":\"struct ICarbonVortex.Price\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalCollected\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"maxInput\",\"type\":\"uint128\"}],\"name\":\"trade\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"tradingEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"collects fees and allows users to trade tokens in a dutch auction style configurable parameters include the target token, final target token and the halflife auctions are initiated by calling the execute function all auctions start with an initial price of 2^128 - 1 half-life parameter sets the price decay rate - - this is the time in seconds it takes for the price to halve - this parameter can be configured so that tokens reach the market rate faster or slower target token is the token to which all other tokens are traded to (can be native token for example) final target token is an additional token to which the target token is traded to (optional) transferAddress is the address to which all target / final target tokens are sent to\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"used to set immutable state variables\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address)\":{\"details\":\"fully initializes the contract and its parents\"},\"postUpgrade(bool,bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdrawFunds(address[],address,uint256[])\":{\"details\":\"withdraws funds held by the contract and sends them to an account requirements: - the caller must be the admin of the contract\"}},\"version\":1},\"userdoc\":{\"events\":{\"FundsWithdrawn(address[],address,address,uint256[])\":{\"notice\":\"triggered when tokens have been withdrawn by the admin\"},\"MaxTargetTokenSaleAmountUpdated(uint128,uint128)\":{\"notice\":\"triggered when the target token sale amount is updated\"},\"MinTokenSaleAmountMultiplierUpdated(uint32,uint32)\":{\"notice\":\"Triggered when the minimum token sale amount multiplier is updated\"},\"MinTokenSaleAmountUpdated(address,uint128,uint128)\":{\"notice\":\"triggered when the min token sale amount is updated\"},\"PairDisabledStatusUpdated(address,bool,bool)\":{\"notice\":\"triggered when pair status is updated\"},\"PriceDecayHalfLifeUpdated(uint32,uint32)\":{\"notice\":\"triggered when the price decay halflife is updated (for all tokens except the target token)\"},\"PriceResetMultiplierUpdated(uint32,uint32)\":{\"notice\":\"triggered when the price reset multiplier is updated\"},\"PriceUpdated(address,(uint128,uint128))\":{\"notice\":\"triggered after the price updates for a token\"},\"RewardsUpdated(uint32,uint32)\":{\"notice\":\"triggered when the rewards ppm are updated\"},\"TargetTokenPriceDecayHalfLifeOnResetUpdated(uint32,uint32)\":{\"notice\":\"triggered when the price decay halflife on price reset is updated (for the target token only)\"},\"TargetTokenPriceDecayHalfLifeUpdated(uint32,uint32)\":{\"notice\":\"triggered when the price decay halflife is updated (for the target token only)\"},\"TokenTraded(address,address,uint128,uint128)\":{\"notice\":\"triggered after a successful trade is executed\"},\"TradingReset(address,(uint128,uint128))\":{\"notice\":\"triggered when trading is reset for a token (dutch auction has been restarted)\"},\"TransferAddressUpdated(address,address)\":{\"notice\":\"triggered when the transfer address is updated\"}},\"kind\":\"user\",\"methods\":{\"amountAvailableForTrading(address)\":{\"notice\":\"returns the amount available for trading for the token\"},\"availableTokens(address)\":{\"notice\":\"returns the total available fees for the given token\"},\"disablePair(address,bool)\":{\"notice\":\"sets if trading is enabled or disabled for a token requirements: - the caller must be the admin of the contract\"},\"execute(address[])\":{\"notice\":\"withdraws the fees of the provided token from Carbon andenables trading for the token if not already enabled\"},\"expectedTradeInput(address,uint128)\":{\"notice\":\"returns the source amount required given a target amount\"},\"expectedTradeReturn(address,uint128)\":{\"notice\":\"returns the target amount expected given a source amount\"},\"finalTargetToken()\":{\"notice\":\"returns the final target token\"},\"minTargetTokenSaleAmount()\":{\"notice\":\"returns the min target token sale amount\"},\"minTokenSaleAmount(address)\":{\"notice\":\"returns the min token sale amount\"},\"minTokenSaleAmountMultiplier()\":{\"notice\":\"returns the min token sale amount multiplier\"},\"pairDisabled(address)\":{\"notice\":\"returns true if pair is disabled (admin-controllable)\"},\"priceDecayHalfLife()\":{\"notice\":\"returns the price decay half-life for all tokens except the target tokenaccording to the exp decay formula\"},\"priceResetMultiplier()\":{\"notice\":\"returns the price reset multiplier\"},\"rewardsPPM()\":{\"notice\":\"returns the rewards ppm\"},\"setMaxTargetTokenSaleAmount(uint128)\":{\"notice\":\"sets the max (or initial) target token sale amount requirements: - the caller must be the admin of the contract\"},\"setMinTargetTokenSaleAmount(uint128)\":{\"notice\":\"sets the min target token sale amount requirements: - the caller must be the admin of the contract\"},\"setMinTokenSaleAmountMultiplier(uint32)\":{\"notice\":\"sets the minimum token sale amount multiplier Requirements: - The caller must be the admin of the contract.\"},\"setPriceDecayHalfLife(uint32)\":{\"notice\":\"sets the price decay half-life for all tokens except target requirements: - the caller must be the admin of the contract\"},\"setPriceResetMultiplier(uint32)\":{\"notice\":\"sets the price reset multiplier requirements: - the caller must be the admin of the contract\"},\"setRewardsPPM(uint32)\":{\"notice\":\"sets the rewards ppm requirements: - the caller must be the admin of the contract\"},\"setTargetTokenPriceDecayHalfLife(uint32)\":{\"notice\":\"sets the price decay half-life for the target token requirements: - the caller must be the admin of the contract\"},\"setTargetTokenPriceDecayHalfLifeOnReset(uint32)\":{\"notice\":\"sets the price decay half-life for the target token on reset Requirements: - The caller must be the admin of the contract.\"},\"setTransferAddress(address)\":{\"notice\":\"sets the transfer address requirements: - the caller must be the current admin of the contract\"},\"targetToken()\":{\"notice\":\"returns the target token\"},\"targetTokenPriceDecayHalfLife()\":{\"notice\":\"returns the price decay half-life for the target token according to the exp decay formula\"},\"targetTokenPriceDecayHalfLifeOnReset()\":{\"notice\":\"returns the price decay half-life for the target token on reset (slow) according to the exp decay formula\"},\"targetTokenSaleAmount()\":{\"notice\":\"returns the initial and current target token sale amount\"},\"tokenPrice(address)\":{\"notice\":\"returns the current token price (targetToken / TKN)if token == targetToken, returns finalTargetToken / targetToken price\"},\"totalCollected()\":{\"notice\":\"returns the total target (if no final target token has been defined) or final target tokens collected \"},\"trade(address,uint128,uint128)\":{\"notice\":\"trades *targetToken* for *targetAmount* of *token* based on the current token price (trade by target amount)if token == *targetToken*, trades *finalTargetToken* for amount of *targetToken* and alsoresets the current token sale amount if it's below the min amount after a tradereverts if source amount required is greater than maxInput\"},\"tradingEnabled(address)\":{\"notice\":\"returns true if trading is enabled for token (dutch auction started)\"},\"transferAddress()\":{\"notice\":\"returns the transfer address\"}},\"notice\":\"CarbonVortex contract\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vortex/CarbonVortex.sol\":\"CarbonVortex\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 * ```solidity\\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 * ```solidity\\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. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\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(IAccessControlUpgradeable).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 StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleRevoked} event.\\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 * May emit a {RoleRevoked} event.\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleRevoked} event.\\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 /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.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 IAccessControlUpgradeable {\\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\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\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 ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\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 /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\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 unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\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 unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\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] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable {\\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\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * ```solidity\\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 EnumerableSetUpgradeable {\\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\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\\n * 0 before setting it to a non-zero value.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"contracts/carbon/Pairs.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nstruct Pair {\\n uint128 id;\\n Token[2] tokens;\\n}\\n\\nabstract contract Pairs is Initializable {\\n error PairAlreadyExists();\\n error PairDoesNotExist();\\n\\n // unique incremental id representing a pair\\n uint128 private _lastPairId;\\n\\n // mapping of pairs of tokens to their pair id, tokens are sorted at any order\\n mapping(Token => mapping(Token => uint128)) private _pairIds;\\n\\n // mapping between a pairId to its Pair object\\n mapping(uint128 => Token[2]) private _pairsStorage;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 3] private __gap;\\n\\n /**\\n * @dev triggered when a new pair is created\\n */\\n event PairCreated(uint128 indexed pairId, Token indexed token0, Token indexed token1);\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Pairs_init() internal onlyInitializing {\\n __Pairs_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Pairs_init_unchained() internal onlyInitializing {}\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev generates and stores a new pair, tokens are assumed unique and valid\\n */\\n function _createPair(Token token0, Token token1) internal returns (Pair memory) {\\n // validate pair existence\\n if (_pairExists(token0, token1)) {\\n revert PairAlreadyExists();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // increment pair id\\n uint128 id = _lastPairId + 1;\\n _lastPairId = id;\\n\\n // store pair\\n _pairsStorage[id] = sortedTokens;\\n _pairIds[sortedTokens[0]][sortedTokens[1]] = id;\\n\\n emit PairCreated(id, sortedTokens[0], sortedTokens[1]);\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n /**\\n * @dev return a pair matching the given tokens\\n */\\n function _pair(Token token0, Token token1) internal view returns (Pair memory) {\\n // validate pair existence\\n if (!_pairExists(token0, token1)) {\\n revert PairDoesNotExist();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // return pair\\n uint128 id = _pairIds[sortedTokens[0]][sortedTokens[1]];\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n function _pairById(uint128 pairId) internal view returns (Pair memory) {\\n Token[2] memory tokens = _pairsStorage[pairId];\\n if (Token.unwrap(tokens[0]) == address(0)) {\\n revert PairDoesNotExist();\\n }\\n return Pair({ id: pairId, tokens: tokens });\\n }\\n\\n /**\\n * @dev check for the existence of a pair (pair id's are sequential integers starting at 1)\\n */\\n function _pairExists(Token token0, Token token1) internal view returns (bool) {\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n if (_pairIds[sortedTokens[0]][sortedTokens[1]] == 0) {\\n return false;\\n }\\n return true;\\n }\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function _pairs() internal view returns (Token[2][] memory) {\\n uint128 length = _lastPairId;\\n Token[2][] memory list = new Token[2][](length);\\n for (uint128 i = 0; i < length; i++) {\\n list[i] = _pairsStorage[i + 1];\\n }\\n\\n return list;\\n }\\n\\n /**\\n * returns the given tokens sorted by address value, smaller first\\n */\\n function _sortTokens(Token token0, Token token1) private pure returns (Token[2] memory) {\\n return Token.unwrap(token0) < Token.unwrap(token1) ? [token0, token1] : [token1, token0];\\n }\\n}\\n\",\"keccak256\":\"0xf93c805727414083085098262481ac9def2bdeafcb71934234b0b92cc6320551\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/Strategies.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSetUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Pair } from \\\"./Pairs.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { PPM_RESOLUTION } from \\\"../utility/Constants.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev:\\n *\\n * a strategy consists of two orders:\\n * - order 0 sells `y0` units of token 0 at a marginal rate `M0` ranging between `L0` and `H0`\\n * - order 1 sells `y1` units of token 1 at a marginal rate `M1` ranging between `L1` and `H1`\\n *\\n * rate symbols:\\n * - `L0` indicates the lowest value of one wei of token 0 in units of token 1\\n * - `H0` indicates the highest value of one wei of token 0 in units of token 1\\n * - `M0` indicates the marginal value of one wei of token 0 in units of token 1\\n * - `L1` indicates the lowest value of one wei of token 1 in units of token 0\\n * - `H1` indicates the highest value of one wei of token 1 in units of token 0\\n * - `M1` indicates the marginal value of one wei of token 1 in units of token 0\\n *\\n * the term \\\"one wei\\\" serves here as a simplification of \\\"an amount tending to zero\\\",\\n * hence the rate values above are all theoretical.\\n * moreover, since trade calculation is based on the square roots of the rates,\\n * an order doesn't actually hold the rate values, but a modified version of them.\\n * for each rate `r`, the order maintains:\\n * - mantissa: the value of the 48 most significant bits of `floor(sqrt(r) * 2 ^ 48)`\\n * - exponent: the number of the remaining (least significant) bits, limited up to 48\\n * this allows for rates between ~12.6e-28 and ~7.92e+28, at an average resolution of ~2.81e+14.\\n * it also ensures that every rate value `r` is supported if and only if `1 / r` is supported.\\n * however, it also yields a certain degree of accuracy loss as soon as the order is created.\\n *\\n * encoding / decoding scheme:\\n * - `b(x) = bit-length of x`\\n * - `c(x) = max(b(x) - 48, 0)`\\n * - `f(x) = floor(sqrt(x) * (1 << 48))`\\n * - `g(x) = f(x) >> c(f(x)) << c(f(x))`\\n * - `e(x) = (x >> c(x)) | (c(x) << 48)`\\n * - `d(x) = (x & ((1 << 48) - 1)) << (x >> 48)`\\n *\\n * let the following denote:\\n * - `L = g(lowest rate)`\\n * - `H = g(highest rate)`\\n * - `M = g(marginal rate)`\\n *\\n * then the order maintains:\\n * - `y = current liquidity`\\n * - `z = current liquidity * (H - L) / (M - L)`\\n * - `A = e(H - L)`\\n * - `B = e(L)`\\n *\\n * and the order reflects:\\n * - `L = d(B)`\\n * - `H = d(B + A)`\\n * - `M = d(B + A * y / z)`\\n *\\n * upon trading on a given order in a given strategy:\\n * - the value of `y` in the given order decreases\\n * - the value of `y` in the other order increases\\n * - the value of `z` in the other order may increase\\n * - the values of all other parameters remain unchanged\\n *\\n * given a source amount `x`, the expected target amount is:\\n * - theoretical formula: `M ^ 2 * x * y / (M * (M - L) * x + y)`\\n * - implemented formula: `x * (A * y + B * z) ^ 2 / (A * x * (A * y + B * z) + z ^ 2)`\\n *\\n * given a target amount `x`, the required source amount is:\\n * - theoretical formula: `x * y / (M * (L - M) * x + M ^ 2 * y)`\\n * - implemented formula: `x * z ^ 2 / ((A * y + B * z) * (A * y + B * z - A * x))`\\n *\\n * fee scheme:\\n * +-------------------+---------------------------------+---------------------------------+\\n * | trade function | trader transfers to contract | contract transfers to trader |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | bySourceAmount(x) | trader transfers to contract: x | p = expectedTargetAmount(x) |\\n * | | | q = p * (100 - fee%) / 100 |\\n * | | | contract transfers to trader: q |\\n * | | | contract retains as fee: p - q |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | byTargetAmount(x) | p = requiredSourceAmount(x) | contract transfers to trader: x |\\n * | | q = p * 100 / (100 - fee%) | |\\n * | | trader transfers to contract: q | |\\n * | | contract retains as fee: q - p | |\\n * +-------------------+---------------------------------+---------------------------------+\\n */\\n\\n// solhint-disable var-name-mixedcase\\nstruct Order {\\n uint128 y;\\n uint128 z;\\n uint64 A;\\n uint64 B;\\n}\\n// solhint-enable var-name-mixedcase\\n\\nstruct TradeTokens {\\n Token source;\\n Token target;\\n}\\n\\nstruct Strategy {\\n uint256 id;\\n address owner;\\n Token[2] tokens;\\n Order[2] orders;\\n}\\n\\nstruct TradeAction {\\n uint256 strategyId;\\n uint128 amount;\\n}\\n\\n// strategy update reasons\\nuint8 constant STRATEGY_UPDATE_REASON_EDIT = 0;\\nuint8 constant STRATEGY_UPDATE_REASON_TRADE = 1;\\n\\nabstract contract Strategies is Initializable {\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\\n using Address for address payable;\\n using SafeCast for uint256;\\n\\n error NativeAmountMismatch();\\n error BalanceMismatch();\\n error GreaterThanMaxInput();\\n error LowerThanMinReturn();\\n error InsufficientCapacity();\\n error InsufficientLiquidity();\\n error InvalidRate();\\n error InvalidTradeActionStrategyId();\\n error InvalidTradeActionAmount();\\n error OrderDisabled();\\n error OutDated();\\n\\n struct SourceAndTargetAmounts {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct TradeParams {\\n address trader;\\n TradeTokens tokens;\\n bool byTargetAmount;\\n uint128 constraint;\\n uint256 txValue;\\n Pair pair;\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n uint256 private constant ONE = 1 << 48;\\n\\n uint256 private constant ORDERS_INVERTED_FLAG = 1 << 255;\\n\\n uint32 private constant DEFAULT_TRADING_FEE_PPM = 4000; // 0.4%\\n\\n // total number of strategies\\n uint128 private _strategyCounter;\\n\\n // the global trading fee (in units of PPM)\\n uint32 internal _tradingFeePPM;\\n\\n // mapping between a strategy to its packed orders\\n mapping(uint256 => uint256[3]) private _packedOrdersByStrategyId;\\n\\n // mapping between a pair id to its strategies ids\\n mapping(uint128 => EnumerableSetUpgradeable.UintSet) private _strategyIdsByPairIdStorage;\\n\\n // accumulated fees per token\\n mapping(Token => uint256) internal _accumulatedFees;\\n\\n // mapping between a pair id to its custom trading fee (in units of PPM)\\n mapping(uint128 pairId => uint32 fee) internal _customTradingFeePPM;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n * @dev triggered when the network fee is updated\\n */\\n event TradingFeePPMUpdated(uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when the custom trading fee for a given pair is updated\\n */\\n event PairTradingFeePPMUpdated(Token indexed token0, Token indexed token1, uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when a strategy is created\\n */\\n event StrategyCreated(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is deleted\\n */\\n event StrategyDeleted(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is updated\\n */\\n event StrategyUpdated(\\n uint256 indexed id,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1,\\n uint8 reason\\n );\\n\\n /**\\n * @dev triggered when tokens are traded\\n */\\n event TokensTraded(\\n address indexed trader,\\n Token indexed sourceToken,\\n Token indexed targetToken,\\n uint256 sourceAmount,\\n uint256 targetAmount,\\n uint128 tradingFeeAmount,\\n bool byTargetAmount\\n );\\n\\n /**\\n * @dev triggered when fees are withdrawn\\n */\\n event FeesWithdrawn(Token indexed token, address indexed recipient, uint256 indexed amount, address sender);\\n\\n // solhint-disable func-name-mixedcase\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Strategies_init() internal onlyInitializing {\\n __Strategies_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Strategies_init_unchained() internal onlyInitializing {\\n _setTradingFeePPM(DEFAULT_TRADING_FEE_PPM);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev creates a new strategy\\n */\\n function _createStrategy(\\n IVoucher voucher,\\n Token[2] memory tokens,\\n Order[2] calldata orders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal returns (uint256) {\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(tokens[0], owner, orders[0].y, value, true);\\n _validateDepositAndRefundExcessNativeToken(tokens[1], owner, orders[1].y, value, true);\\n\\n // store id\\n uint128 counter = _strategyCounter + 1;\\n _strategyCounter = counter;\\n uint256 id = _strategyId(pair.id, counter);\\n _strategyIdsByPairIdStorage[pair.id].add(id);\\n\\n // store orders\\n bool ordersInverted = tokens[0] == pair.tokens[1];\\n _packedOrdersByStrategyId[id] = _packOrders(orders, ordersInverted);\\n\\n // mint voucher\\n voucher.mint(owner, id);\\n\\n // emit event\\n emit StrategyCreated({\\n id: id,\\n owner: owner,\\n token0: tokens[0],\\n token1: tokens[1],\\n order0: orders[0],\\n order1: orders[1]\\n });\\n\\n return id;\\n }\\n\\n /**\\n * @dev updates an existing strategy\\n */\\n function _updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal {\\n // prepare storage variable\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // revert if the strategy mutated since this tx was sent\\n if (!_equalStrategyOrders(currentOrders, orders)) {\\n revert OutDated();\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(newOrders, ordersInverted);\\n if (packedOrdersMemory[0] != newPackedOrders[0]) {\\n packedOrders[0] = newPackedOrders[0];\\n }\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // deposit and withdraw\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n Token token = sortedTokens[i];\\n if (newOrders[i].y < orders[i].y) {\\n // liquidity decreased - withdraw the difference\\n uint128 delta = orders[i].y - newOrders[i].y;\\n _withdrawFunds(token, payable(owner), delta);\\n } else if (newOrders[i].y > orders[i].y) {\\n // liquidity increased - deposit the difference\\n uint128 delta = newOrders[i].y - orders[i].y;\\n _validateDepositAndRefundExcessNativeToken(token, owner, delta, value, true);\\n }\\n\\n // refund native token when there's no deposit in the order\\n // note that deposit handles refunds internally\\n if (value > 0 && token.isNative() && newOrders[i].y <= orders[i].y) {\\n payable(address(owner)).sendValue(value);\\n }\\n }\\n\\n // emit event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: sortedTokens[0],\\n token1: sortedTokens[1],\\n order0: newOrders[0],\\n order1: newOrders[1],\\n reason: STRATEGY_UPDATE_REASON_EDIT\\n });\\n }\\n\\n /**\\n * @dev deletes a strategy\\n */\\n function _deleteStrategy(uint256 strategyId, IVoucher voucher, Pair memory pair) internal {\\n Strategy memory strategy = _strategy(strategyId, voucher, pair);\\n\\n // burn the voucher nft token\\n voucher.burn(strategy.id);\\n\\n // clear storage\\n delete _packedOrdersByStrategyId[strategy.id];\\n _strategyIdsByPairIdStorage[pair.id].remove(strategy.id);\\n\\n // withdraw funds\\n _withdrawFunds(strategy.tokens[0], payable(strategy.owner), strategy.orders[0].y);\\n _withdrawFunds(strategy.tokens[1], payable(strategy.owner), strategy.orders[1].y);\\n\\n // emit event\\n emit StrategyDeleted({\\n id: strategy.id,\\n owner: strategy.owner,\\n token0: strategy.tokens[0],\\n token1: strategy.tokens[1],\\n order0: strategy.orders[0],\\n order1: strategy.orders[1]\\n });\\n }\\n\\n /**\\n * @dev perform trade, update affected strategies\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function _trade(TradeAction[] calldata tradeActions, TradeParams memory params) internal {\\n bool isTargetToken0 = params.tokens.target == params.pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(params.pair.id, strategyId, amount);\\n\\n (Order memory targetOrder, Order memory sourceOrder) = isTargetToken0 == ordersInverted\\n ? (orders[1], orders[0])\\n : (orders[0], orders[1]);\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n params.byTargetAmount\\n );\\n\\n // handled specifically for a custom error message\\n if (targetOrder.y < targetAmount) {\\n revert InsufficientLiquidity();\\n }\\n\\n // update the orders with the new values\\n // safe since it's checked above\\n unchecked {\\n targetOrder.y -= targetAmount;\\n }\\n\\n sourceOrder.y += sourceAmount;\\n if (sourceOrder.z < sourceOrder.y) {\\n sourceOrder.z = sourceOrder.y;\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(orders, ordersInverted);\\n\\n // both y values are in slot 0, so it has definitely changed\\n packedOrders[0] = newPackedOrders[0];\\n\\n // one of the z values is in slot 1, so it has possibly changed\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n\\n // the other z value has possibly changed only if the first one hasn't\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // emit update event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: params.pair.tokens[ordersInverted ? 1 : 0],\\n token1: params.pair.tokens[ordersInverted ? 0 : 1],\\n order0: orders[0],\\n order1: orders[1],\\n reason: STRATEGY_UPDATE_REASON_TRADE\\n });\\n\\n params.sourceAmount += sourceAmount;\\n params.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n uint128 tradingFeeAmount;\\n if (params.byTargetAmount) {\\n uint128 amountIncludingFee = _addFee(params.sourceAmount, params.pair.id);\\n tradingFeeAmount = amountIncludingFee - params.sourceAmount;\\n params.sourceAmount = amountIncludingFee;\\n if (params.sourceAmount > params.constraint) {\\n revert GreaterThanMaxInput();\\n }\\n _accumulatedFees[params.tokens.source] += tradingFeeAmount;\\n } else {\\n uint128 amountExcludingFee = _subtractFee(params.targetAmount, params.pair.id);\\n tradingFeeAmount = params.targetAmount - amountExcludingFee;\\n params.targetAmount = amountExcludingFee;\\n if (params.targetAmount < params.constraint) {\\n revert LowerThanMinReturn();\\n }\\n _accumulatedFees[params.tokens.target] += tradingFeeAmount;\\n }\\n\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(\\n params.tokens.source,\\n params.trader,\\n params.sourceAmount,\\n params.txValue,\\n false\\n );\\n _withdrawFunds(params.tokens.target, payable(params.trader), params.targetAmount);\\n\\n // tokens traded successfully, emit event\\n emit TokensTraded({\\n trader: params.trader,\\n sourceToken: params.tokens.source,\\n targetToken: params.tokens.target,\\n sourceAmount: params.sourceAmount,\\n targetAmount: params.targetAmount,\\n tradingFeeAmount: tradingFeeAmount,\\n byTargetAmount: params.byTargetAmount\\n });\\n }\\n\\n /**\\n * @dev calculates the required amount plus fee\\n */\\n function _addFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // divide the input amount by `1 - fee`\\n return MathEx.mulDivC(amount, PPM_RESOLUTION, PPM_RESOLUTION - tradingFeePPM).toUint128();\\n }\\n\\n /**\\n * @dev calculates the expected amount minus fee\\n */\\n function _subtractFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // multiply the input amount by `1 - fee`\\n return MathEx.mulDivF(amount, PPM_RESOLUTION - tradingFeePPM, PPM_RESOLUTION).toUint128();\\n }\\n\\n /**\\n * @dev get the custom trading fee ppm for a given pair (returns default trading fee if not set for pair)\\n */\\n function _getPairTradingFeePPM(uint128 pairId) internal view returns (uint32) {\\n uint32 customTradingFeePPM = _customTradingFeePPM[pairId];\\n return customTradingFeePPM == 0 ? _tradingFeePPM : customTradingFeePPM;\\n }\\n\\n /**\\n * @dev calculates and returns the total source and target amounts of a trade, including fees\\n */\\n function _tradeSourceAndTargetAmounts(\\n TradeTokens memory tokens,\\n TradeAction[] calldata tradeActions,\\n Pair memory pair,\\n bool byTargetAmount\\n ) internal view returns (SourceAndTargetAmounts memory totals) {\\n bool isTargetToken0 = tokens.target == pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[strategyId];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(pair.id, strategyId, amount);\\n\\n Order memory targetOrder = isTargetToken0 == ordersInverted ? orders[1] : orders[0];\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n byTargetAmount\\n );\\n\\n // update totals\\n totals.sourceAmount += sourceAmount;\\n totals.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n if (byTargetAmount) {\\n totals.sourceAmount = _addFee(totals.sourceAmount, pair.id);\\n } else {\\n totals.targetAmount = _subtractFee(totals.targetAmount, pair.id);\\n }\\n }\\n\\n /**\\n * @dev returns stored strategies of a pair\\n */\\n function _strategiesByPair(\\n Pair memory pair,\\n uint256 startIndex,\\n uint256 endIndex,\\n IVoucher voucher\\n ) internal view returns (Strategy[] memory) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n uint256 allLength = strategyIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last value possible\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n Strategy[] memory result = new Strategy[](resultLength);\\n for (uint256 i = 0; i < resultLength; i = uncheckedInc(i)) {\\n uint256 strategyId = strategyIds.at(startIndex + i);\\n result[i] = _strategy(strategyId, voucher, pair);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev returns the count of stored strategies of a pair\\n */\\n function _strategiesByPairCount(Pair memory pair) internal view returns (uint256) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n return strategyIds.length();\\n }\\n\\n /**\\n @dev returns a strategy object matching the provided id.\\n */\\n function _strategy(uint256 id, IVoucher voucher, Pair memory pair) internal view returns (Strategy memory) {\\n // fetch data\\n address _owner = voucher.ownerOf(id);\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[id];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // handle sorting\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n\\n return Strategy({ id: id, owner: _owner, tokens: sortedTokens, orders: orders });\\n }\\n\\n /**\\n * @dev validates deposit amounts, refunds excess native tokens sent\\n */\\n function _validateDepositAndRefundExcessNativeToken(\\n Token token,\\n address owner,\\n uint256 depositAmount,\\n uint256 txValue,\\n bool validateDepositAmount\\n ) private {\\n if (token.isNative()) {\\n if (txValue < depositAmount) {\\n revert NativeAmountMismatch();\\n }\\n\\n // refund the owner for the remaining native token amount\\n if (txValue > depositAmount) {\\n payable(address(owner)).sendValue(txValue - depositAmount);\\n }\\n } else if (depositAmount > 0) {\\n if (validateDepositAmount) {\\n uint256 prevBalance = token.balanceOf(address(this));\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n uint256 newBalance = token.balanceOf(address(this));\\n if (newBalance - prevBalance != depositAmount) {\\n revert BalanceMismatch();\\n }\\n } else {\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n }\\n }\\n }\\n\\n function _validateTradeParams(uint128 pairId, uint256 strategyId, uint128 tradeAmount) private pure {\\n // make sure the strategy id matches the pair id\\n if (_pairIdByStrategyId(strategyId) != pairId) {\\n revert InvalidTradeActionStrategyId();\\n }\\n\\n // make sure the trade amount is nonzero\\n if (tradeAmount == 0) {\\n revert InvalidTradeActionAmount();\\n }\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n */\\n function _setTradingFeePPM(uint32 newTradingFeePPM) internal {\\n uint32 prevTradingFeePPM = _tradingFeePPM;\\n if (prevTradingFeePPM == newTradingFeePPM) {\\n return;\\n }\\n\\n _tradingFeePPM = newTradingFeePPM;\\n\\n emit TradingFeePPMUpdated({ prevFeePPM: prevTradingFeePPM, newFeePPM: newTradingFeePPM });\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n */\\n function _setPairTradingFeePPM(Pair memory pair, uint32 newCustomTradingFeePPM) internal {\\n uint32 prevCustomTradingFeePPM = _customTradingFeePPM[pair.id];\\n if (prevCustomTradingFeePPM == newCustomTradingFeePPM) {\\n return;\\n }\\n\\n _customTradingFeePPM[pair.id] = newCustomTradingFeePPM;\\n\\n emit PairTradingFeePPMUpdated({\\n token0: pair.tokens[0],\\n token1: pair.tokens[1],\\n prevFeePPM: prevCustomTradingFeePPM,\\n newFeePPM: newCustomTradingFeePPM\\n });\\n }\\n\\n /**\\n * returns true if the provided orders are equal, false otherwise\\n */\\n function _equalStrategyOrders(Order[2] memory orders0, Order[2] memory orders1) internal pure returns (bool) {\\n uint256 i;\\n for (i = 0; i < 2; i = uncheckedInc(i)) {\\n if (\\n orders0[i].y != orders1[i].y ||\\n orders0[i].z != orders1[i].z ||\\n orders0[i].A != orders1[i].A ||\\n orders0[i].B != orders1[i].B\\n ) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @dev returns:\\n *\\n * x * (A * y + B * z) ^ 2\\n * ---------------------------------\\n * A * x * (A * y + B * z) + z ^ 2\\n *\\n */\\n function _calculateTradeTargetAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivF(x, B * B, ONE * ONE);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 * x;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp3, A);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivC(temp3, A, factor);\\n\\n (bool safe, uint256 sum) = SafeMath.tryAdd(temp4, temp5);\\n if (safe) {\\n return MathEx.mulDivF(temp2, temp3 / factor, sum);\\n }\\n return temp2 / (A + MathEx.mulDivC(temp1, temp1, temp3));\\n }\\n\\n /**\\n * @dev returns:\\n *\\n * x * z ^ 2\\n * -------------------------------------------\\n * (A * y + B * z) * (A * y + B * z - A * x)\\n *\\n */\\n function _calculateTradeSourceAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivC(x, ONE * ONE, B * B);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 - x * A;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp2, temp3);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivF(temp2, temp3, factor);\\n return MathEx.mulDivC(x, temp4, temp5);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev pack 2 orders into a 3 slot uint256 data structure\\n */\\n function _packOrders(Order[2] memory orders, bool ordersInverted) private pure returns (uint256[3] memory values) {\\n values = [\\n uint256((uint256(orders[0].y) << 0) | (uint256(orders[1].y) << 128)),\\n uint256((uint256(orders[0].z) << 0) | (uint256(orders[0].A) << 128) | (uint256(orders[0].B) << 192)),\\n uint256(\\n (uint256(orders[1].z) << 0) |\\n (uint256(orders[1].A) << 128) |\\n (uint256(orders[1].B) << 192) |\\n (ordersInverted ? ORDERS_INVERTED_FLAG : 0)\\n )\\n ];\\n }\\n\\n /**\\n * @dev unpack 2 stored orders into an array of Order types\\n */\\n function _unpackOrders(\\n uint256[3] memory values\\n ) private pure returns (Order[2] memory orders, bool ordersInverted) {\\n orders = [\\n Order({\\n y: uint128(values[0] >> 0),\\n z: uint128(values[1] >> 0),\\n A: uint64(values[1] >> 128),\\n B: uint64(values[1] >> 192)\\n }),\\n Order({\\n y: uint128(values[0] >> 128),\\n z: uint128(values[2] >> 0),\\n A: uint64(values[2] >> 128),\\n B: uint64((values[2] << 1) >> 193)\\n })\\n ];\\n ordersInverted = values[2] >= ORDERS_INVERTED_FLAG;\\n }\\n\\n /**\\n * @dev expand a given rate\\n */\\n function _expandRate(uint256 rate) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (rate % ONE) << (rate / ONE);\\n }\\n }\\n\\n /**\\n * @dev validates a given rate\\n */\\n function _validRate(uint256 rate) internal pure returns (bool) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (ONE >> (rate / ONE)) > 0;\\n }\\n }\\n\\n /**\\n * @dev returns the source and target amounts of a single trade action\\n */\\n function _singleTradeActionSourceAndTargetAmounts(\\n Order memory order,\\n uint128 amount,\\n bool byTargetAmount\\n ) internal pure returns (uint128 sourceAmount, uint128 targetAmount) {\\n uint256 y = uint256(order.y);\\n uint256 z = uint256(order.z);\\n uint256 a = _expandRate(uint256(order.A));\\n uint256 b = _expandRate(uint256(order.B));\\n if (byTargetAmount) {\\n sourceAmount = _calculateTradeSourceAmount(amount, y, z, a, b).toUint128();\\n targetAmount = amount;\\n } else {\\n sourceAmount = amount;\\n targetAmount = _calculateTradeTargetAmount(amount, y, z, a, b).toUint128();\\n }\\n }\\n\\n /**\\n * revert if any of the orders is invalid\\n */\\n function _validateOrders(Order[2] calldata orders) internal pure {\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n if (orders[i].z < orders[i].y) {\\n revert InsufficientCapacity();\\n }\\n if (!_validRate(orders[i].A)) {\\n revert InvalidRate();\\n }\\n if (!_validRate(orders[i].B)) {\\n revert InvalidRate();\\n }\\n }\\n }\\n\\n /**\\n * returns the strategyId for a given pairId and a given strategyIndex\\n */\\n function _strategyId(uint128 pairId, uint128 strategyIndex) internal pure returns (uint256) {\\n return (uint256(pairId) << 128) | strategyIndex;\\n }\\n\\n /**\\n * returns the pairId associated with a given strategyId\\n */\\n function _pairIdByStrategyId(uint256 strategyId) internal pure returns (uint128) {\\n return uint128(strategyId >> 128);\\n }\\n\\n function _withdrawFees(address sender, uint256 amount, Token token, address recipient) internal returns (uint256) {\\n uint256 accumulatedAmount = _accumulatedFees[token];\\n if (accumulatedAmount == 0) {\\n return 0;\\n }\\n if (amount > accumulatedAmount) {\\n amount = accumulatedAmount;\\n }\\n\\n _accumulatedFees[token] = accumulatedAmount - amount;\\n _withdrawFunds(token, payable(recipient), amount);\\n emit FeesWithdrawn(token, recipient, amount, sender);\\n return amount;\\n }\\n\\n /**\\n * returns tokens sorted accordingly to a strategy orders inversion\\n */\\n function _sortStrategyTokens(Pair memory pair, bool ordersInverted) private pure returns (Token[2] memory) {\\n return ordersInverted ? [pair.tokens[1], pair.tokens[0]] : pair.tokens;\\n }\\n\\n /**\\n * sends erc20 or native token to the provided target\\n */\\n function _withdrawFunds(Token token, address payable target, uint256 amount) private {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (token.isNative()) {\\n // using a regular transfer here would revert due to exceeding the 2300 gas limit which is why we're using\\n // call instead (via sendValue), which the 2300 gas limit does not apply for\\n target.sendValue(amount);\\n } else {\\n token.safeTransfer(target, amount);\\n }\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xddfe729cc073256f10ce38329e8155108692bafa508326f959ff06e049849f44\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/interfaces/ICarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Pair } from \\\"../Pairs.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\nimport { Strategy, TradeAction, Order } from \\\"../Strategies.sol\\\";\\n\\n/**\\n * @dev Carbon Controller interface\\n */\\ninterface ICarbonController is IUpgradeable {\\n /**\\n * @dev returns the type of the controller\\n */\\n function controllerType() external pure returns (uint16);\\n\\n /**\\n * @dev returns the trading fee (in units of PPM)\\n */\\n function tradingFeePPM() external view returns (uint32);\\n\\n /**\\n * @dev returns the trading fee for a given pair (in units of PPM)\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32);\\n\\n /**\\n * @dev creates a new pair of provided token0 and token1\\n */\\n function createPair(Token token0, Token token1) external returns (Pair memory);\\n\\n /**\\n * @dev returns a pair's metadata matching the provided token0 and token1\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory);\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function pairs() external view returns (Token[2][] memory);\\n\\n // solhint-disable var-name-mixedcase\\n /**\\n * @dev creates a new strategy, returns the strategy's id\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with assigned liquidity in the order, if any\\n */\\n function createStrategy(Token token0, Token token1, Order[2] calldata orders) external payable returns (uint256);\\n\\n /**\\n * @dev updates an existing strategy\\n *\\n * notes:\\n * - currentOrders should reflect the orders values at the time of sending the tx\\n * this prevents cases in which the strategy was updated due to a trade between\\n * the time the transaction was sent and the time it was mined, thus, giving more\\n * control to the strategy owner.\\n * - reduced liquidity is refunded to the owner\\n * - increased liquidity is deposited\\n * - excess native token is returned to the sender if any\\n * - the sorting of orders is expected to equal the sorting upon creation\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with increased liquidity, if any\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable;\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev deletes a strategy matching the provided id\\n *\\n * notes:\\n *\\n * - 100% of liquidity is withdrawn and sent to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the owner of the NFT voucher\\n */\\n function deleteStrategy(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a strategy matching the provided id,\\n * note tokens and orders are returned sorted as provided upon creation\\n */\\n function strategy(uint256 id) external view returns (Strategy memory);\\n\\n /**\\n * @dev returns strategies belonging to a specific pair\\n * note that for the full list of strategies pass 0 to both startIndex and endIndex\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory);\\n\\n /**\\n * @dev returns the count of strategies belonging to a specific pair\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256);\\n\\n /**\\n * @dev performs a trade by specifying a fixed source amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev performs a trade by specifying a fixed target amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev returns the source amount required when trading by target amount\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the target amount expected when trading by source amount\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the amount of fees accumulated for the specified token\\n */\\n function accumulatedFees(Token token) external view returns (uint256);\\n\\n /**\\n * @dev transfers the accumulated fees to the specified recipient\\n *\\n * notes:\\n * `amount` is capped to the available amount\\n * returns the amount withdrawn\\n */\\n function withdrawFees(Token token, uint256 amount, address recipient) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xf495e13cd389a72edea6e37db3ae5b419718eea5efc2cfb48259747c2399ff15\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/token/Token.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\n/**\\n * @dev This type implements ERC20 and SafeERC20 utilities for both the native token and for ERC20 tokens\\n */\\ntype Token is address;\\nusing SafeERC20 for IERC20;\\nusing Address for address payable;\\n\\n// the address that represents the native token reserve\\naddress constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// the symbol that represents the native token\\nstring constant NATIVE_TOKEN_SYMBOL = \\\"ETH\\\";\\n\\n// the decimals for the native token\\nuint8 constant NATIVE_TOKEN_DECIMALS = 18;\\n\\n// the token representing the native token\\nToken constant NATIVE_TOKEN = Token.wrap(NATIVE_TOKEN_ADDRESS);\\n\\nusing {\\n equal as ==,\\n notEqual as !=,\\n isNative,\\n symbol,\\n decimals,\\n balanceOf,\\n allowance,\\n safeTransfer,\\n safeTransferFrom,\\n safeApprove,\\n safeIncreaseAllowance,\\n unsafeTransfer\\n} for Token global;\\n\\n/* solhint-disable func-visibility */\\n\\nfunction equal(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) == Token.unwrap(b);\\n}\\n\\nfunction notEqual(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) != Token.unwrap(b);\\n}\\n\\n/**\\n * @dev returns whether the provided token represents an ERC20 or the native token reserve\\n */\\nfunction isNative(Token token) pure returns (bool) {\\n return token == NATIVE_TOKEN;\\n}\\n\\n/**\\n * @dev returns the symbol of the native token/ERC20 token\\n */\\nfunction symbol(Token token) view returns (string memory) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_SYMBOL;\\n }\\n return toERC20(token).symbol();\\n}\\n\\n/**\\n * @dev returns the decimals of the native token/ERC20 token\\n */\\nfunction decimals(Token token) view returns (uint8) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_DECIMALS;\\n }\\n return toERC20(token).decimals();\\n}\\n\\n/**\\n * @dev returns the balance of the native token/ERC20 token\\n */\\nfunction balanceOf(Token token, address account) view returns (uint256) {\\n if (isNative(token)) {\\n return account.balance;\\n }\\n return toIERC20(token).balanceOf(account);\\n}\\n\\n/**\\n * @dev returns the allowance of an `owner` to a `spender`\\n */\\nfunction allowance(Token token, address owner, address spender) view returns (uint256) {\\n if (isNative(token)) {\\n return 0;\\n }\\n return toIERC20(token).allowance(owner, spender);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n */\\nfunction safeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n if (isNative(token)) {\\n payable(to).transfer(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token from a specific holder using the allowance mechanism\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeTransferFrom(Token token, address from, address to, uint256 amount) {\\n if (amount == 0 || isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeTransferFrom(from, to, amount);\\n}\\n\\n/**\\n * @dev approves a specific amount of the native token/ERC20 token from a specific holder\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeApprove(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeApprove(spender, amount);\\n}\\n\\n/**\\n * @dev atomically increases the allowance granted to `spender` by the caller.\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeIncreaseAllowance(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeIncreaseAllowance(spender, amount);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n * @dev forwards all available gas if sending native token\\n */\\nfunction unsafeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (isNative(token)) {\\n payable(to).sendValue(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev utility function that converts a token to an IERC20\\n */\\nfunction toIERC20(Token token) pure returns (IERC20) {\\n return IERC20(Token.unwrap(token));\\n}\\n\\n/**\\n * @dev utility function that converts a token to an ERC20\\n */\\nfunction toERC20(Token token) pure returns (ERC20) {\\n return ERC20(Token.unwrap(token));\\n}\\n\\n/* solhint-disable func-visibility */\\n\",\"keccak256\":\"0x410b7ec2315aa0631a12c7d37f5ade829d4f1d326834cde1004ddab33ed5049e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x6cbf2c0e48b5377fe5fea47278256856368612efd7e29b17c716f1611b64d0f3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/ExpDecayMath.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Fraction } from \\\"./Fraction.sol\\\";\\nimport { MathEx } from \\\"./MathEx.sol\\\";\\n\\n/**\\n * @dev This library supports the calculation of exponential price decay\\n */\\nlibrary ExpDecayMath {\\n /**\\n * @dev returns the amount required for a token after a given time period since trading has been enabled\\n *\\n * the returned value is calculated as `amount / 2 ^ (timeElapsed / halfLife)`\\n * note that the input value to this function is limited by `timeElapsed / halfLife < 129`\\n */\\n function calcExpDecay(uint256 amount, uint32 timeElapsed, uint32 halfLife) internal pure returns (uint256) {\\n uint256 integerPart = timeElapsed / halfLife;\\n uint256 fractionPart = timeElapsed % halfLife;\\n Fraction memory input = Fraction({ n: fractionPart, d: halfLife });\\n Fraction memory output = MathEx.exp2(input);\\n return MathEx.mulDivF(amount, output.d, output.n * 2 ** integerPart);\\n }\\n}\\n\",\"keccak256\":\"0x20ff0b389d0eb2e720bb7006144650a7632ab76be3555ba68380930b37c1b41f\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Fraction.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nstruct Fraction {\\n uint256 n;\\n uint256 d;\\n}\\n\",\"keccak256\":\"0x84c801ef901e7fd30e99637377b29dfa28c6c1fa140adb5c872fddd8b82fd358\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/MathEx.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Fraction } from \\\"./Fraction.sol\\\";\\n\\nuint256 constant ONE = 0x80000000000000000000000000000000;\\nuint256 constant LN2 = 0x58b90bfbe8e7bcd5e4f1d9cc01f97b57;\\n\\n/**\\n * @dev this library provides a set of complex math operations\\n */\\nlibrary MathEx {\\n error Overflow();\\n\\n /**\\n * @dev returns the largest integer smaller than or equal to `x * y / z`\\n */\\n function mulDivF(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n (uint256 xyhi, uint256 xylo) = _mul512(x, y);\\n\\n // if `x * y < 2 ^ 256`\\n if (xyhi == 0) {\\n return xylo / z;\\n }\\n\\n // assert `x * y / z < 2 ^ 256`\\n if (xyhi >= z) {\\n revert Overflow();\\n }\\n\\n uint256 m = _mulMod(x, y, z); // `m = x * y % z`\\n (uint256 nhi, uint256 nlo) = _sub512(xyhi, xylo, m); // `n = x * y - m` hence `n / z = floor(x * y / z)`\\n\\n // if `n < 2 ^ 256`\\n if (nhi == 0) {\\n return nlo / z;\\n }\\n\\n uint256 p = _unsafeSub(0, z) & z; // `p` is the largest power of 2 which `z` is divisible by\\n uint256 q = _div512(nhi, nlo, p); // `n` is divisible by `p` because `n` is divisible by `z` and `z` is divisible by `p`\\n uint256 r = _inv256(z / p); // `z / p = 1 mod 2` hence `inverse(z / p) = 1 mod 2 ^ 256`\\n return _unsafeMul(q, r); // `q * r = (n / p) * inverse(z / p) = n / z`\\n }\\n }\\n\\n /**\\n * @dev returns the smallest integer larger than or equal to `x * y / z`\\n */\\n function mulDivC(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n uint256 w = mulDivF(x, y, z);\\n if (_mulMod(x, y, z) > 0) {\\n if (w >= type(uint256).max) {\\n revert Overflow();\\n }\\n unchecked {\\n // safe because `w < type(uint256).max`\\n return w + 1;\\n }\\n }\\n return w;\\n }\\n\\n /**\\n * @dev returns the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n */\\n function minFactor(uint256 x, uint256 y) internal pure returns (uint256) {\\n (uint256 hi, uint256 lo) = _mul512(x, y);\\n unchecked {\\n // safe because:\\n // - if `x < 2 ^ 256 - 1` or `y < 2 ^ 256 - 1`\\n // then `hi < 2 ^ 256 - 2`\\n // hence neither `hi + 1` nor `hi + 2` overflows\\n // - if `x = 2 ^ 256 - 1` and `y = 2 ^ 256 - 1`\\n // then `hi = 2 ^ 256 - 2 = ~lo`\\n // hence `hi + 1`, which does not overflow, is computed\\n return hi > ~lo ? hi + 2 : hi + 1;\\n }\\n\\n /* reasoning:\\n |\\n | general:\\n | - find the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n | - the value of `x * y` is represented via `2 ^ 256 * hi + lo`\\n | - the expression `~lo` is equivalent to `2 ^ 256 - 1 - lo`\\n | \\n | symbols:\\n | - let `H` denote `hi`\\n | - let `L` denote `lo`\\n | - let `N` denote `2 ^ 256 - 1`\\n | \\n | inference:\\n | `x * y / z <= 2 ^ 256 - 1` <-->\\n | `x * y / (2 ^ 256 - 1) <= z` <-->\\n | `((N + 1) * H + L) / N <= z` <-->\\n | `(N * H + H + L) / N <= z` <-->\\n | `H + (H + L) / N <= z`\\n | \\n | inference:\\n | `0 <= H <= N && 0 <= L <= N` <-->\\n | `0 <= H + L <= N + N` <-->\\n | `0 <= H + L <= N * 2` <-->\\n | `0 <= (H + L) / N <= 2`\\n | \\n | inference:\\n | - `0 = (H + L) / N` --> `H + L = 0` --> `x * y = 0` --> `z = 1 = H + 1`\\n | - `0 < (H + L) / N <= 1` --> `H + (H + L) / N <= H + 1` --> `z = H + 1`\\n | - `1 < (H + L) / N <= 2` --> `H + (H + L) / N <= H + 2` --> `z = H + 2`\\n | \\n | implementation:\\n | - if `hi > ~lo`:\\n | `~L < H <= N` <-->\\n | `N - L < H <= N` <-->\\n | `N < H + L <= N + L` <-->\\n | `1 < (H + L) / N <= 2` <-->\\n | `H + 1 < H + (H + L) / N <= H + 2` <-->\\n | `z = H + 2`\\n | - if `hi <= ~lo`:\\n | `H <= ~L` <-->\\n | `H <= N - L` <-->\\n | `H + L <= N` <-->\\n | `(H + L) / N <= 1` <-->\\n | `H + (H + L) / N <= H + 1` <-->\\n | `z = H + 1`\\n |\\n */\\n }\\n\\n /**\\n * @dev returns `2 ^ f` by calculating `e ^ (f * ln(2))`, where `e` is Euler's number:\\n * - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\\n * - The exponentiation of each binary exponent is given (pre-calculated)\\n * - The exponentiation of r is calculated via Taylor series for e^x, where x = r\\n * - The exponentiation of the input is calculated by multiplying the intermediate results above\\n * - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859\\n */\\n function exp2(Fraction memory f) internal pure returns (Fraction memory) {\\n uint256 x = MathEx.mulDivF(LN2, f.n, f.d);\\n uint256 y;\\n uint256 z;\\n uint256 n;\\n\\n if (x >= (ONE << 4)) {\\n revert Overflow();\\n }\\n\\n unchecked {\\n z = y = x % (ONE >> 3); // get the input modulo 2^(-3)\\n z = (z * y) / ONE;\\n n += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\\n z = (z * y) / ONE;\\n n += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\\n z = (z * y) / ONE;\\n n += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\\n z = (z * y) / ONE;\\n n += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\\n z = (z * y) / ONE;\\n n += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\\n z = (z * y) / ONE;\\n n += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\\n z = (z * y) / ONE;\\n n += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\\n z = (z * y) / ONE;\\n n += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\\n z = (z * y) / ONE;\\n n += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\\n z = (z * y) / ONE;\\n n += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\\n z = (z * y) / ONE;\\n n += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000001c638; // add y^16 * (20! / 16!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000000017c; // add y^18 * (20! / 18!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000014; // add y^19 * (20! / 19!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000001; // add y^20 * (20! / 20!)\\n n = n / 0x21c3677c82b40000 + y + ONE; // divide by 20! and then add y^1 / 1! + y^0 / 0!\\n\\n if ((x & (ONE >> 3)) != 0)\\n n = (n * 0x1c3d6a24ed82218787d624d3e5eba95f9) / 0x18ebef9eac820ae8682b9793ac6d1e776; // multiply by e^(2^-3)\\n if ((x & (ONE >> 2)) != 0)\\n n = (n * 0x18ebef9eac820ae8682b9793ac6d1e778) / 0x1368b2fc6f9609fe7aceb46aa619baed4; // multiply by e^(2^-2)\\n if ((x & (ONE >> 1)) != 0)\\n n = (n * 0x1368b2fc6f9609fe7aceb46aa619baed5) / 0x0bc5ab1b16779be3575bd8f0520a9f21f; // multiply by e^(2^-1)\\n if ((x & (ONE << 0)) != 0)\\n n = (n * 0x0bc5ab1b16779be3575bd8f0520a9f21e) / 0x0454aaa8efe072e7f6ddbab84b40a55c9; // multiply by e^(2^+0)\\n if ((x & (ONE << 1)) != 0)\\n n = (n * 0x0454aaa8efe072e7f6ddbab84b40a55c5) / 0x00960aadc109e7a3bf4578099615711ea; // multiply by e^(2^+1)\\n if ((x & (ONE << 2)) != 0)\\n n = (n * 0x00960aadc109e7a3bf4578099615711d7) / 0x0002bf84208204f5977f9a8cf01fdce3d; // multiply by e^(2^+2)\\n if ((x & (ONE << 3)) != 0)\\n n = (n * 0x0002bf84208204f5977f9a8cf01fdc307) / 0x0000003c6ab775dd0b95b4cbee7e65d11; // multiply by e^(2^+3)\\n }\\n\\n return Fraction({ n: n, d: ONE });\\n }\\n\\n /**\\n * @dev returns the value of `x * y`\\n */\\n function _mul512(uint256 x, uint256 y) private pure returns (uint256, uint256) {\\n uint256 p = _mulModMax(x, y);\\n uint256 q = _unsafeMul(x, y);\\n if (p >= q) {\\n unchecked {\\n // safe because `p >= q`\\n return (p - q, q);\\n }\\n }\\n unchecked {\\n // safe because `p < q` hence `_unsafeSub(p, q) > 0`\\n return (_unsafeSub(p, q) - 1, q);\\n }\\n }\\n\\n /**\\n * @dev returns the value of `x - y`\\n */\\n function _sub512(uint256 xhi, uint256 xlo, uint256 y) private pure returns (uint256, uint256) {\\n if (xlo >= y) {\\n unchecked {\\n // safe because `xlo >= y`\\n return (xhi, xlo - y);\\n }\\n }\\n return (xhi - 1, _unsafeSub(xlo, y));\\n }\\n\\n /**\\n * @dev returns the value of `x / pow2n`, given that `x` is divisible by `pow2n`\\n */\\n function _div512(uint256 xhi, uint256 xlo, uint256 pow2n) private pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n uint256 pow2nInv = _unsafeAdd(_unsafeSub(0, pow2n) / pow2n, 1); // `1 << (256 - n)`\\n return _unsafeMul(xhi, pow2nInv) | (xlo / pow2n); // `(xhi << (256 - n)) | (xlo >> n)`\\n }\\n }\\n\\n /**\\n * @dev returns the inverse of `d` modulo `2 ^ 256`, given that `d` is congruent to `1` modulo `2`\\n */\\n function _inv256(uint256 d) private pure returns (uint256) {\\n // approximate the root of `f(x) = 1 / x - d` using the newton\\u2013raphson convergence method\\n uint256 x = 1;\\n unchecked {\\n // safe because `i < 8`\\n for (uint256 i = 0; i < 8; i++) {\\n x = _unsafeMul(x, _unsafeSub(2, _unsafeMul(x, d))); // `x = x * (2 - x * d) mod 2 ^ 256`\\n }\\n }\\n return x;\\n }\\n\\n /**\\n * @dev returns `(x + y) % 2 ^ 256`\\n */\\n function _unsafeAdd(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x + y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x - y) % 2 ^ 256`\\n */\\n function _unsafeSub(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x - y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x * y) % 2 ^ 256`\\n */\\n function _unsafeMul(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x * y;\\n }\\n }\\n\\n /**\\n * @dev returns `x * y % (2 ^ 256 - 1)`\\n */\\n function _mulModMax(uint256 x, uint256 y) private pure returns (uint256) {\\n return mulmod(x, y, type(uint256).max);\\n }\\n\\n /**\\n * @dev returns `x * y % z`\\n */\\n function _mulMod(uint256 x, uint256 y, uint256 z) private pure returns (uint256) {\\n return mulmod(x, y, z);\\n }\\n}\\n\",\"keccak256\":\"0x2ff481334338c5d5b13f918a3a58dfebb9ec3329848117acd7ac7e63382664c5\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = version();\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bool checkVersion, bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n uint16 _version = version();\\n if (checkVersion && initializations != _version) {\\n revert AlreadyInitialized();\\n } else if (!checkVersion) {\\n initializations = _version;\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51a93a5b7f213049503a865250848012d2e4f76c359559c00b6abd5314b1908e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf6f3ad1ec3ee378729ebe1ffc0ac72e95a6353a9ec5b85fdf3e4c3b0f54a5f1e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xcc42138a568e5b5e6e1b96402d351ea04627e03bf24c0b62439910d3fda2773c\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { Token } from \\\"../../token/Token.sol\\\";\\n\\n/**\\n * @dev an interface for a vault\\n */\\ninterface IVault {\\n /**\\n * @dev withdraws funds held by the contract and sends them to an account\\n */\\n function withdrawFunds(\\n Token token,\\n address payable target,\\n uint256 amount\\n ) external;\\n}\\n\",\"keccak256\":\"0xe7ac355f02fc6a9cbec017f21e764f5d717b4efc77ea4b00eb729979dc686fc2\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xa5068bacf412d0eac67377cfed9cc2bd6b36099cc4bba9f360a38d05a7bf4a04\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/vortex/CarbonVortex.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ICarbonVortex } from \\\"./interfaces/ICarbonVortex.sol\\\";\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { IVault } from \\\"../utility/interfaces/IVault.sol\\\";\\nimport { ICarbonController } from \\\"../carbon/interfaces/ICarbonController.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { Token, NATIVE_TOKEN } from \\\"../token/Token.sol\\\";\\nimport { Utils } from \\\"../utility/Utils.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { ExpDecayMath } from \\\"../utility/ExpDecayMath.sol\\\";\\nimport { PPM_RESOLUTION, MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @notice CarbonVortex contract\\n *\\n * @dev\\n *\\n * collects fees and allows users to trade tokens in a dutch auction style\\n * configurable parameters include the target token, final target token and the halflife\\n * auctions are initiated by calling the execute function\\n * all auctions start with an initial price of 2^128 - 1\\n * half-life parameter sets the price decay rate -\\n * - this is the time in seconds it takes for the price to halve\\n * - this parameter can be configured so that tokens reach the market rate faster or slower\\n * target token is the token to which all other tokens are traded to (can be native token for example)\\n * final target token is an additional token to which the target token is traded to (optional)\\n * transferAddress is the address to which all target / final target tokens are sent to\\n */\\ncontract CarbonVortex is ICarbonVortex, Upgradeable, ReentrancyGuardUpgradeable, Utils {\\n using Address for address payable;\\n using SafeCast for uint256;\\n\\n uint128 private constant INITIAL_PRICE_SOURCE_AMOUNT = type(uint128).max;\\n uint128 private constant INITIAL_PRICE_TARGET_AMOUNT = 1e12;\\n\\n // addresses for token withdrawal\\n ICarbonController private immutable _carbonController;\\n IVault private immutable _vault;\\n\\n // first token for swapping\\n Token private immutable _targetToken;\\n // second (optional) token for swapping\\n Token private immutable _finalTargetToken;\\n\\n // total target (if no finalTarget token is defined) / finalTarget tokens collected in transferAddress\\n uint256 private _totalCollected;\\n\\n // rewards ppm (points per million) - used to calculate rewards for the caller\\n uint32 private _rewardsPPM;\\n\\n // price reset multiplier - used to reset the price after a trade in special cases\\n uint32 private _priceResetMultiplier;\\n\\n // min token sale amount multiplier - used to reset the price after execute in special cases\\n uint32 private _minTokenSaleAmountMultiplier;\\n\\n // time until the price gets halved for the target token during a trade\\n uint32 private _targetTokenPriceDecayHalfLife;\\n\\n // time until the price gets halved for the target token on price reset during a trade\\n uint32 private _targetTokenPriceDecayHalfLifeOnReset;\\n\\n // time until the price gets halved for all tokens when auction is initialized\\n uint32 private _priceDecayHalfLife;\\n\\n // token to pair disabled mapping (disabled pairs aren't tradeable)\\n mapping(Token token => bool pairDisabled) private _disabledPairs;\\n\\n // token to trading start time mapping\\n mapping(Token token => uint32 tradingStartTime) private _tradingStartTimes;\\n\\n // token to initial price mapping\\n mapping(Token token => Price initialPrice) private _initialPrice;\\n\\n // min token sale amounts - resets the token price if below this amount after a call to execute\\n // resets the current sale amount if below this amount after a trade (for target token)\\n mapping(Token token => uint128 _minTokenSaleAmount) private _minTokenSaleAmounts;\\n\\n // initial and current target token sale amount - for targetToken->finalTargetToken trades\\n SaleAmount private _targetTokenSaleAmount;\\n\\n // address for token collection - collects all swapped target/final target tokens\\n address payable private _transferAddress;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 8] private __gap;\\n\\n /**\\n * @dev used to set immutable state variables\\n */\\n constructor(\\n ICarbonController carbonController,\\n IVault vault,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\n\\n _targetToken = targetTokenInit;\\n _finalTargetToken = finalTargetTokenInit;\\n _disableInitializers();\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize(address payable transferAddressInit) public initializer {\\n __CarbonVortex_init(transferAddressInit);\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __CarbonVortex_init(address payable transferAddressInit) internal onlyInitializing {\\n __Upgradeable_init();\\n __ReentrancyGuard_init();\\n\\n __CarbonVortex_init_unchained(transferAddressInit);\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __CarbonVortex_init_unchained(address payable transferAddressInit) internal onlyInitializing {\\n // set rewards PPM to 1000\\n _setRewardsPPM(1000);\\n // set price reset multiplier to 2x\\n _setPriceResetMultiplier(2);\\n // set min token sale amount multiplier to 4x\\n _setMinTokenSaleAmountMultiplier(4);\\n // set price decay half-life to 12 hours\\n _setPriceDecayHalfLife(12 hours);\\n // set target token price decay half-life to 12 hours\\n _setTargetTokenPriceDecayHalfLife(12 hours);\\n // set target token price decay half-life to 10 days\\n _setTargetTokenPriceDecayHalfLifeOnReset(10 days);\\n // set initial target token sale amount to 100 eth\\n _setMaxTargetTokenSaleAmount(uint128(100) * uint128(10) ** _targetToken.decimals());\\n // set min target token sale amount to 10 eth\\n _setMinTokenSaleAmount(_targetToken, uint128(10) * uint128(10) ** _targetToken.decimals());\\n // set transfer address\\n _setTransferAddress(transferAddressInit);\\n }\\n\\n /**\\n * @notice authorize the contract to receive the native token\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev perform various validations for the token array\\n */\\n modifier validateTokens(Token[] calldata tokens) {\\n _validateTokens(tokens);\\n _;\\n }\\n\\n /**\\n * @dev validate token\\n */\\n modifier validToken(Token token) {\\n _validToken(token);\\n _;\\n }\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure override(IVersioned, Upgradeable) returns (uint16) {\\n return 4;\\n }\\n\\n /**\\n * @notice sets the rewards ppm\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setRewardsPPM(uint32 newRewardsPPM) external onlyAdmin validFee(newRewardsPPM) {\\n _setRewardsPPM(newRewardsPPM);\\n }\\n\\n /**\\n * @notice sets the price reset multiplier\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setPriceResetMultiplier(\\n uint32 newPriceResetMultiplier\\n ) external onlyAdmin greaterThanZero(newPriceResetMultiplier) {\\n _setPriceResetMultiplier(newPriceResetMultiplier);\\n }\\n\\n /**\\n * @notice sets the minimum token sale amount multiplier\\n *\\n * Requirements:\\n *\\n * - The caller must be the admin of the contract.\\n */\\n function setMinTokenSaleAmountMultiplier(\\n uint32 newMinTokenSaleAmountMultiplier\\n ) external onlyAdmin greaterThanZero(newMinTokenSaleAmountMultiplier) {\\n _setMinTokenSaleAmountMultiplier(newMinTokenSaleAmountMultiplier);\\n }\\n\\n /**\\n * @notice sets the price decay half-life for all tokens except target\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setPriceDecayHalfLife(\\n uint32 newPriceDecayHalfLife\\n ) external onlyAdmin greaterThanZero(newPriceDecayHalfLife) {\\n _setPriceDecayHalfLife(newPriceDecayHalfLife);\\n }\\n\\n /**\\n * @notice sets the price decay half-life for the target token\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setTargetTokenPriceDecayHalfLife(\\n uint32 newPriceDecayHalfLife\\n ) external onlyAdmin greaterThanZero(newPriceDecayHalfLife) {\\n _setTargetTokenPriceDecayHalfLife(newPriceDecayHalfLife);\\n }\\n\\n /**\\n * @notice sets the price decay half-life for the target token on reset\\n *\\n * Requirements:\\n *\\n * - The caller must be the admin of the contract.\\n */\\n function setTargetTokenPriceDecayHalfLifeOnReset(\\n uint32 newPriceDecayHalfLife\\n ) external onlyAdmin greaterThanZero(newPriceDecayHalfLife) {\\n _setTargetTokenPriceDecayHalfLifeOnReset(newPriceDecayHalfLife);\\n }\\n\\n /**\\n * @notice sets the max (or initial) target token sale amount\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setMaxTargetTokenSaleAmount(\\n uint128 newMaxTargetTokenSaleAmount\\n ) external onlyAdmin greaterThanZero(newMaxTargetTokenSaleAmount) {\\n _setMaxTargetTokenSaleAmount(newMaxTargetTokenSaleAmount);\\n }\\n\\n /**\\n * @notice sets the min target token sale amount\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setMinTargetTokenSaleAmount(\\n uint128 newMinTargetTokenSaleAmount\\n ) external onlyAdmin greaterThanZero(newMinTargetTokenSaleAmount) {\\n _setMinTokenSaleAmount(_targetToken, newMinTargetTokenSaleAmount);\\n }\\n\\n /**\\n * @notice sets if trading is enabled or disabled for a token\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function disablePair(Token token, bool disabled) external onlyAdmin {\\n _setPairDisabled(token, disabled);\\n }\\n\\n /**\\n * @notice sets the transfer address\\n *\\n * requirements:\\n *\\n * - the caller must be the current admin of the contract\\n */\\n function setTransferAddress(address newTransferAddress) external onlyAdmin {\\n _setTransferAddress(newTransferAddress);\\n }\\n\\n /**\\n * @dev withdraws funds held by the contract and sends them to an account\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function withdrawFunds(\\n Token[] calldata tokens,\\n address payable target,\\n uint256[] calldata amounts\\n ) external validAddress(target) validateTokens(tokens) nonReentrant onlyAdmin {\\n uint256 len = tokens.length;\\n if (len != amounts.length) {\\n revert InvalidAmountLength();\\n }\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n // safe due to nonReentrant modifier (forwards all available gas in case of ETH)\\n tokens[i].unsafeTransfer(target, amounts[i]);\\n }\\n\\n emit FundsWithdrawn({ tokens: tokens, caller: msg.sender, target: target, amounts: amounts });\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function rewardsPPM() external view returns (uint32) {\\n return _rewardsPPM;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function totalCollected() external view returns (uint256) {\\n return _totalCollected;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function targetToken() external view returns (Token) {\\n return _targetToken;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function finalTargetToken() external view returns (Token) {\\n return _finalTargetToken;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function transferAddress() external view returns (address) {\\n return _transferAddress;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function availableTokens(Token token) external view returns (uint256) {\\n uint256 totalFees = 0;\\n if (address(_carbonController) != address(0)) {\\n totalFees += _carbonController.accumulatedFees(token);\\n }\\n if (address(_vault) != address(0)) {\\n totalFees += token.balanceOf(address(_vault));\\n }\\n return totalFees + token.balanceOf(address(this));\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function execute(Token[] calldata tokens) external nonReentrant validateTokens(tokens) {\\n uint256 len = tokens.length;\\n\\n // allocate array for the fee amounts for the tokens\\n uint256[] memory feeAmounts = new uint256[](len);\\n // allocate array for the reward amounts for caller\\n uint256[] memory rewardAmounts = new uint256[](len);\\n // cache rewardsPPM to save gas\\n uint256 rewardsPPMValue = _rewardsPPM;\\n\\n // cache address checks to save gas\\n bool carbonControllerIsNotZero = address(_carbonController) != address(0);\\n bool vaultIsNotZero = address(_vault) != address(0);\\n\\n // withdraw fees from carbon vault\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n // withdraw token fees\\n uint256 totalFeeAmount = 0;\\n if (carbonControllerIsNotZero) {\\n totalFeeAmount += _carbonController.withdrawFees(token, type(uint256).max, address(this));\\n }\\n if (vaultIsNotZero) {\\n // get vault token balance\\n uint256 vaultBalance = token.balanceOf(address(_vault));\\n // withdraw vault token balance\\n _vault.withdrawFunds(token, payable(address(this)), vaultBalance);\\n totalFeeAmount += vaultBalance;\\n }\\n feeAmounts[i] = totalFeeAmount;\\n\\n // get reward amount for token\\n rewardAmounts[i] = MathEx.mulDivF(totalFeeAmount, rewardsPPMValue, PPM_RESOLUTION);\\n }\\n\\n // go through all tokens and start / reset dutch auction if necessary\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n uint256 totalFeeAmount = feeAmounts[i];\\n // get fee and reward amounts\\n uint256 rewardAmount = rewardAmounts[i];\\n uint256 feeAmount = totalFeeAmount - rewardAmount;\\n // skip token if no fees have accumulated or token pair is disabled\\n if (totalFeeAmount == 0 || _disabledPairs[token]) {\\n continue;\\n }\\n // transfer proceeds to the transfer address for the final target token\\n if (token == _finalTargetToken) {\\n _transferProceeds(token, feeAmount);\\n continue;\\n }\\n\\n if (token == _targetToken) {\\n // if _finalTargetToken is not set, directly transfer the fees to the transfer address\\n if (Token.unwrap(_finalTargetToken) == address(0)) {\\n _transferProceeds(_targetToken, feeAmount);\\n } else if (\\n !_tradingEnabled(token) ||\\n _amountAvailableForTrading(token) < _minTokenSaleAmounts[token] ||\\n _auctionPriceIsBelowMinimum(token)\\n ) {\\n // reset trading for target token\\n _resetTradingTarget(rewardAmount);\\n }\\n } else {\\n uint128 tradingAmount = _amountAvailableForTrading(token);\\n if (\\n !_tradingEnabled(token) ||\\n tradingAmount - feeAmount < _minTokenSaleAmounts[token] ||\\n tradingAmount > _minTokenSaleAmountMultiplier * _minTokenSaleAmounts[token] ||\\n _auctionPriceIsBelowMinimum(token)\\n ) {\\n // reset trading for token\\n _resetTrading(token, rewardAmount);\\n }\\n }\\n }\\n\\n // allocate rewards to caller\\n _allocateRewards(msg.sender, tokens, rewardAmounts);\\n }\\n\\n /**\\n * @dev resets dutch auction for target token -> TKN trades and set the initial price to max possible\\n */\\n function _resetTrading(Token token, uint256 rewardAmount) private {\\n // reset the auction with the initial price\\n Price memory price = _resetAuction(token);\\n // set min token sale amount\\n _setMinTokenSaleAmount(token, (token.balanceOf(address(this)) - rewardAmount).toUint128() / 2);\\n emit TradingReset({ token: token, price: price });\\n }\\n\\n /**\\n * @dev resets dutch auction for finalTargetToken->targetToken trades and set the initial price to max possible\\n */\\n function _resetTradingTarget(uint256 rewardAmount) private {\\n // reset the auction with the initial price\\n Price memory price = _resetAuction(_targetToken);\\n // reset the current target token sale amount\\n _targetTokenSaleAmount.current = Math\\n .min(_targetToken.balanceOf(address(this)) - rewardAmount, _targetTokenSaleAmount.initial)\\n .toUint128();\\n // set price decay halflife to the current price decay halflife\\n _setTargetTokenPriceDecayHalfLife(_priceDecayHalfLife);\\n // emit trading reset event\\n emit TradingReset({ token: _targetToken, price: price });\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function priceResetMultiplier() external view returns (uint32) {\\n return _priceResetMultiplier;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function minTokenSaleAmountMultiplier() external view returns (uint32) {\\n return _minTokenSaleAmountMultiplier;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function priceDecayHalfLife() external view returns (uint32) {\\n return _priceDecayHalfLife;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function targetTokenPriceDecayHalfLife() external view returns (uint32) {\\n return _targetTokenPriceDecayHalfLife;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function targetTokenPriceDecayHalfLifeOnReset() external view returns (uint32) {\\n return _targetTokenPriceDecayHalfLifeOnReset;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function targetTokenSaleAmount() external view returns (SaleAmount memory) {\\n return _targetTokenSaleAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function minTokenSaleAmount(Token token) external view returns (uint128) {\\n return _minTokenSaleAmounts[token];\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function minTargetTokenSaleAmount() external view returns (uint128) {\\n return _minTokenSaleAmounts[_targetToken];\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function pairDisabled(Token token) external view returns (bool) {\\n return _disabledPairs[token];\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function tradingEnabled(Token token) external view returns (bool) {\\n return _tradingEnabled(token);\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function amountAvailableForTrading(Token token) external view returns (uint128) {\\n return _amountAvailableForTrading(token);\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function expectedTradeReturn(Token token, uint128 sourceAmount) external view validToken(token) returns (uint128) {\\n Price memory currentPrice = tokenPrice(token);\\n // revert if price is not valid\\n _validPrice(currentPrice);\\n // calculate the target amount based on the current price and token\\n uint128 targetAmount = MathEx\\n .mulDivF(currentPrice.targetAmount, sourceAmount, currentPrice.sourceAmount)\\n .toUint128();\\n // revert if not enough amount available for trade\\n if (targetAmount > _amountAvailableForTrading(token)) {\\n revert InsufficientAmountForTrading();\\n }\\n return targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function expectedTradeInput(Token token, uint128 targetAmount) public view validToken(token) returns (uint128) {\\n // revert if not enough amount available for trade\\n if (targetAmount > _amountAvailableForTrading(token)) {\\n revert InsufficientAmountForTrading();\\n }\\n Price memory currentPrice = tokenPrice(token);\\n // revert if current price is not valid\\n _validPrice(currentPrice);\\n // calculate the trade input based on the current price\\n return MathEx.mulDivC(currentPrice.sourceAmount, targetAmount, currentPrice.targetAmount).toUint128();\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function tokenPrice(Token token) public view returns (Price memory) {\\n // cache trading start time to save gas\\n uint32 tradingStartTime = _tradingStartTimes[token];\\n // revert if trading hasn't been enabled for a token\\n if (tradingStartTime == 0) {\\n revert TradingDisabled();\\n }\\n // get time elapsed since trading was enabled\\n uint32 timeElapsed = uint32(block.timestamp) - tradingStartTime;\\n // get initial price as set by resetTrading\\n Price memory price = _initialPrice[token];\\n // get the halflife for the token\\n uint32 currentPriceDecayHalfLife = token == _targetToken ? _targetTokenPriceDecayHalfLife : _priceDecayHalfLife;\\n // get the current price by adjusting the amount with the exp decay formula\\n price.sourceAmount = ExpDecayMath\\n .calcExpDecay(price.sourceAmount, timeElapsed, currentPriceDecayHalfLife)\\n .toUint128();\\n // return the price\\n return price;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function trade(\\n Token token,\\n uint128 targetAmount,\\n uint128 maxInput\\n ) external payable nonReentrant validToken(token) greaterThanZero(targetAmount) {\\n uint128 sourceAmount;\\n if (token == _targetToken) {\\n sourceAmount = _sellTargetForFinalTarget(targetAmount, maxInput);\\n } else {\\n sourceAmount = _sellTokenForTargetToken(token, targetAmount, maxInput);\\n }\\n emit TokenTraded({ caller: msg.sender, token: token, sourceAmount: sourceAmount, targetAmount: targetAmount });\\n }\\n\\n function _sellTokenForTargetToken(Token token, uint128 targetAmount, uint128 maxInput) private returns (uint128) {\\n uint128 sourceAmount = expectedTradeInput(token, targetAmount);\\n // revert if trade requires 0 target token\\n if (sourceAmount == 0) {\\n revert InvalidTrade();\\n }\\n // revert if trade requires more than maxInput\\n if (sourceAmount > maxInput) {\\n revert GreaterThanMaxInput();\\n }\\n // revert if unnecessary native token is received\\n if (_targetToken != NATIVE_TOKEN && msg.value > 0) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n // check enough target token (if target token is native) has been sent for the trade\\n if (_targetToken == NATIVE_TOKEN && msg.value < sourceAmount) {\\n revert InsufficientNativeTokenSent();\\n }\\n _targetToken.safeTransferFrom(msg.sender, address(this), sourceAmount);\\n // transfer the tokens to caller\\n token.safeTransfer(msg.sender, targetAmount);\\n\\n // if no final target token is defined, transfer the target token to `transferAddress`\\n if (Token.unwrap(_finalTargetToken) == address(0)) {\\n _transferProceeds(_targetToken, sourceAmount);\\n }\\n\\n // if remaining balance is below the min token sale amount, reset the auction\\n if (_amountAvailableForTrading(token) < _minTokenSaleAmounts[token]) {\\n _resetTrading(token, 0);\\n }\\n\\n // if available target token trading amount is below the min target token sale amount, reset the target token auction\\n if (\\n Token.unwrap(_finalTargetToken) != address(0) &&\\n _amountAvailableForTrading(_targetToken) <\\n _minTokenSaleAmounts[_targetToken] / _minTokenSaleAmountMultiplier\\n ) {\\n _resetTradingTarget(0);\\n }\\n\\n // if the target token is native, refund any excess native token to caller\\n if (_targetToken == NATIVE_TOKEN && msg.value > sourceAmount) {\\n payable(msg.sender).sendValue(msg.value - sourceAmount);\\n }\\n\\n return sourceAmount;\\n }\\n\\n function _sellTargetForFinalTarget(uint128 targetAmount, uint128 maxInput) private returns (uint128) {\\n uint128 sourceAmount = expectedTradeInput(_targetToken, targetAmount);\\n // revert if trade requires 0 finalTarget tokens\\n if (sourceAmount == 0) {\\n revert InvalidTrade();\\n }\\n // revert if trade requires more than maxInput\\n if (sourceAmount > maxInput) {\\n revert GreaterThanMaxInput();\\n }\\n // revert if unnecessary native token is received\\n if (_finalTargetToken != NATIVE_TOKEN && msg.value > 0) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n // check enough final target token (if final target token is native) has been sent for the trade\\n if (_finalTargetToken == NATIVE_TOKEN && msg.value < sourceAmount) {\\n revert InsufficientNativeTokenSent();\\n }\\n _finalTargetToken.safeTransferFrom(msg.sender, address(this), sourceAmount);\\n // transfer the _targetToken to the user\\n // safe due to nonReentrant modifier (forwards all available gas if native)\\n _targetToken.unsafeTransfer(msg.sender, targetAmount);\\n\\n _transferProceeds(_finalTargetToken, sourceAmount);\\n\\n // if final target token is native, refund any excess native token to caller\\n if (_finalTargetToken == NATIVE_TOKEN && msg.value > sourceAmount) {\\n payable(msg.sender).sendValue(msg.value - sourceAmount);\\n }\\n\\n // update the available target token sale amount\\n _targetTokenSaleAmount.current -= targetAmount;\\n\\n // check if remaining target token sale amount is below the min target token sale amount\\n if (_targetTokenSaleAmount.current < _minTokenSaleAmounts[_targetToken]) {\\n // top up the target token sale amount\\n _targetTokenSaleAmount.current = Math\\n .min(_targetToken.balanceOf(address(this)), _targetTokenSaleAmount.initial)\\n .toUint128();\\n // reset the price to price * priceResetMultiplier and restart trading\\n Price memory price = tokenPrice(_targetToken);\\n price.sourceAmount *= _priceResetMultiplier;\\n _initialPrice[_targetToken] = price;\\n _tradingStartTimes[_targetToken] = uint32(block.timestamp);\\n // slow down halflife to `targetTokenPriceDecayHalfLifeOnReset`\\n _setTargetTokenPriceDecayHalfLife(_targetTokenPriceDecayHalfLifeOnReset);\\n // emit price updated event\\n emit PriceUpdated({ token: _targetToken, price: price });\\n }\\n\\n return sourceAmount;\\n }\\n\\n /**\\n * @dev Set minimum token sale amount multiplier helper\\n */\\n function _setMinTokenSaleAmountMultiplier(uint32 newMinTokenSaleAmountMultiplier) private {\\n uint32 prevMinTokenSaleAmountMultiplier = _minTokenSaleAmountMultiplier;\\n\\n // return if the minimum token sale amount multiplier is the same\\n if (prevMinTokenSaleAmountMultiplier == newMinTokenSaleAmountMultiplier) {\\n return;\\n }\\n\\n _minTokenSaleAmountMultiplier = newMinTokenSaleAmountMultiplier;\\n\\n emit MinTokenSaleAmountMultiplierUpdated({\\n prevMinTokenSaleAmountMultiplier: prevMinTokenSaleAmountMultiplier,\\n newMinTokenSaleAmountMultiplier: newMinTokenSaleAmountMultiplier\\n });\\n }\\n\\n /**\\n * @dev set price reset multiplier helper\\n */\\n function _setPriceResetMultiplier(uint32 newPriceResetMultiplier) private {\\n uint32 prevPriceResetMultiplier = _priceResetMultiplier;\\n\\n // return if the price reset multiplier is the same\\n if (prevPriceResetMultiplier == newPriceResetMultiplier) {\\n return;\\n }\\n\\n _priceResetMultiplier = newPriceResetMultiplier;\\n\\n emit PriceResetMultiplierUpdated({\\n prevPriceResetMultiplier: prevPriceResetMultiplier,\\n newPriceResetMultiplier: newPriceResetMultiplier\\n });\\n }\\n\\n /**\\n * @dev set price decay half-life helper\\n */\\n function _setPriceDecayHalfLife(uint32 newPriceDecayHalfLife) private {\\n uint32 prevPriceDecayHalfLife = _priceDecayHalfLife;\\n\\n // return if the price decay half-life is the same\\n if (prevPriceDecayHalfLife == newPriceDecayHalfLife) {\\n return;\\n }\\n\\n _priceDecayHalfLife = newPriceDecayHalfLife;\\n\\n emit PriceDecayHalfLifeUpdated({\\n prevPriceDecayHalfLife: prevPriceDecayHalfLife,\\n newPriceDecayHalfLife: newPriceDecayHalfLife\\n });\\n }\\n\\n /**\\n * @dev set target token price decay half-life helper\\n */\\n function _setTargetTokenPriceDecayHalfLife(uint32 newPriceDecayHalfLife) private {\\n uint32 prevPriceDecayHalfLife = _targetTokenPriceDecayHalfLife;\\n\\n // return if the price decay half-life is the same\\n if (prevPriceDecayHalfLife == newPriceDecayHalfLife) {\\n return;\\n }\\n\\n _targetTokenPriceDecayHalfLife = newPriceDecayHalfLife;\\n\\n emit TargetTokenPriceDecayHalfLifeUpdated({\\n prevPriceDecayHalfLife: prevPriceDecayHalfLife,\\n newPriceDecayHalfLife: newPriceDecayHalfLife\\n });\\n }\\n\\n /**\\n * @dev set target token price decay half-life on price reset helper\\n */\\n function _setTargetTokenPriceDecayHalfLifeOnReset(uint32 newPriceDecayHalfLife) private {\\n uint32 prevPriceDecayHalfLife = _targetTokenPriceDecayHalfLifeOnReset;\\n\\n // Return if the price decay half-life is the same.\\n if (prevPriceDecayHalfLife == newPriceDecayHalfLife) {\\n return;\\n }\\n\\n _targetTokenPriceDecayHalfLifeOnReset = newPriceDecayHalfLife;\\n\\n emit TargetTokenPriceDecayHalfLifeOnResetUpdated({\\n prevPriceDecayHalfLife: prevPriceDecayHalfLife,\\n newPriceDecayHalfLife: newPriceDecayHalfLife\\n });\\n }\\n\\n /**\\n * @dev set max target token sale amount helper\\n */\\n function _setMaxTargetTokenSaleAmount(uint128 newTargetTokenSaleAmount) private {\\n uint128 prevTargetTokenSaleAmount = _targetTokenSaleAmount.initial;\\n\\n // return if the target token sale amount is the same\\n if (prevTargetTokenSaleAmount == newTargetTokenSaleAmount) {\\n return;\\n }\\n\\n _targetTokenSaleAmount.initial = newTargetTokenSaleAmount;\\n\\n // check if the new max sale amount is below the current available target token sale amount\\n if (newTargetTokenSaleAmount < _targetTokenSaleAmount.current) {\\n _targetTokenSaleAmount.current = Math\\n .min(_targetToken.balanceOf(address(this)), newTargetTokenSaleAmount)\\n .toUint128();\\n }\\n\\n emit MaxTargetTokenSaleAmountUpdated({\\n prevTargetTokenSaleAmount: prevTargetTokenSaleAmount,\\n newTargetTokenSaleAmount: newTargetTokenSaleAmount\\n });\\n }\\n\\n /**\\n * @dev set min token sale amount helper\\n */\\n function _setMinTokenSaleAmount(Token token, uint128 newMinTokenSaleAmount) private {\\n uint128 prevMinTokenSaleAmount = _minTokenSaleAmounts[token];\\n\\n // return if the min eth sale amount is the same\\n if (prevMinTokenSaleAmount == newMinTokenSaleAmount) {\\n return;\\n }\\n\\n _minTokenSaleAmounts[token] = newMinTokenSaleAmount;\\n\\n emit MinTokenSaleAmountUpdated({\\n token: token,\\n prevMinTokenSaleAmount: prevMinTokenSaleAmount,\\n newMinTokenSaleAmount: newMinTokenSaleAmount\\n });\\n }\\n\\n function _setRewardsPPM(uint32 newRewardsPPM) private {\\n uint32 prevRewardsPPM = _rewardsPPM;\\n\\n // return if the rewards PPM is the same\\n if (prevRewardsPPM == newRewardsPPM) {\\n return;\\n }\\n\\n _rewardsPPM = newRewardsPPM;\\n\\n emit RewardsUpdated({ prevRewardsPPM: prevRewardsPPM, newRewardsPPM: newRewardsPPM });\\n }\\n\\n function _setPairDisabled(Token token, bool disabled) private {\\n bool prevPairStatus = _disabledPairs[token];\\n\\n // return if the pair status is the same\\n if (prevPairStatus == disabled) {\\n return;\\n }\\n\\n _disabledPairs[token] = disabled;\\n\\n emit PairDisabledStatusUpdated(token, prevPairStatus, disabled);\\n }\\n\\n function _setTransferAddress(address newTransferAddress) private {\\n address prevTransferAddress = _transferAddress;\\n\\n // return if the transfer address is the same\\n if (prevTransferAddress == newTransferAddress) {\\n return;\\n }\\n\\n _transferAddress = payable(newTransferAddress);\\n\\n emit TransferAddressUpdated({\\n prevTransferAddress: prevTransferAddress,\\n newTransferAddress: newTransferAddress\\n });\\n }\\n\\n /**\\n * @dev returns true if the auction price is below or equal to the minimum possible price\\n * @dev check if timeElapsed / priceDecayHalfLife >= 128\\n */\\n function _auctionPriceIsBelowMinimum(Token token) private view returns (bool) {\\n // cache trading start time to save gas\\n uint32 tradingStartTime = _tradingStartTimes[token];\\n // trading hasn't been enabled, return false\\n if (tradingStartTime == 0) {\\n return false;\\n }\\n // get time elapsed since trading was enabled\\n uint32 timeElapsed = uint32(block.timestamp) - tradingStartTime;\\n // get the halflife for the token\\n uint32 currentPriceDecayHalfLife = token == _targetToken ? _targetTokenPriceDecayHalfLife : _priceDecayHalfLife;\\n // check if the maximum amount of halflifes have been reached\\n return timeElapsed / currentPriceDecayHalfLife >= 128;\\n }\\n\\n /**\\n * @dev returns the token amount available for trading\\n */\\n function _amountAvailableForTrading(Token token) private view returns (uint128) {\\n if (token == _targetToken) {\\n return _targetTokenSaleAmount.current;\\n } else {\\n return token.balanceOf(address(this)).toUint128();\\n }\\n }\\n\\n /**\\n * @dev validate token helper\\n */\\n function _validToken(Token token) private view {\\n // validate trading is enabled for token\\n if (!_tradingEnabled(token)) {\\n revert TradingDisabled();\\n }\\n // validate pair isn't disabled\\n if (_disabledPairs[token]) {\\n revert PairDisabled();\\n }\\n }\\n\\n function _validateTokens(Token[] calldata tokens) private pure {\\n uint256 len = tokens.length;\\n if (len == 0) {\\n revert InvalidTokenLength();\\n }\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n // revert for invalid token address\\n if (token == Token.wrap(address(0))) {\\n revert InvalidToken();\\n }\\n // validate token has no duplicates\\n for (uint256 j = uncheckedInc(i); j < len; j = uncheckedInc(j)) {\\n if (token == tokens[j]) {\\n revert DuplicateToken();\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev validate token helper\\n */\\n function _validPrice(Price memory price) private pure {\\n if (price.sourceAmount == 0 || price.targetAmount == 0) {\\n revert InvalidPrice();\\n }\\n }\\n\\n /**\\n * @dev return true if trading is enabled for token\\n */\\n function _tradingEnabled(Token token) private view returns (bool) {\\n return _tradingStartTimes[token] != 0;\\n }\\n\\n /**\\n * @dev allocates the rewards to caller\\n */\\n function _allocateRewards(address sender, Token[] memory tokens, uint256[] memory rewardAmounts) private {\\n uint256 len = tokens.length;\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n uint256 rewardAmount = rewardAmounts[i];\\n // transfer the rewards to caller\\n // safe due to nonReentrant modifier (forwards all available gas in case of ETH)\\n token.unsafeTransfer(sender, rewardAmount);\\n }\\n }\\n\\n /**\\n * @dev helper function to reset the auction to the initial price\\n */\\n function _resetAuction(Token token) private returns (Price memory) {\\n Price memory price = Price({\\n sourceAmount: INITIAL_PRICE_SOURCE_AMOUNT,\\n targetAmount: INITIAL_PRICE_TARGET_AMOUNT\\n });\\n _tradingStartTimes[token] = uint32(block.timestamp);\\n _initialPrice[token] = price;\\n return price;\\n }\\n\\n function _transferProceeds(Token token, uint256 amount) private {\\n // increment totalCollected amount\\n _totalCollected += amount;\\n // if transfer address is 0, proceeds stay in the vortex\\n if (_transferAddress == address(0)) {\\n return;\\n }\\n // safe due to nonReentrant modifier (forwards all available gas in case of ETH)\\n token.unsafeTransfer(_transferAddress, amount);\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8e5b03047d260189a5f6b86990d711ac95d8c80604b0efcb20746be74116a72f\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/vortex/interfaces/ICarbonVortex.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\n\\n/**\\n * @notice CarbonVortex interface\\n */\\ninterface ICarbonVortex is IUpgradeable {\\n error DuplicateToken();\\n error InvalidToken();\\n error InvalidTokenLength();\\n error InvalidAmountLength();\\n error InvalidPrice();\\n error InvalidTrade();\\n error TradingDisabled();\\n error PairDisabled();\\n error GreaterThanMaxInput();\\n error InsufficientNativeTokenSent();\\n error InsufficientAmountForTrading();\\n error UnnecessaryNativeTokenReceived();\\n\\n struct Price {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct SaleAmount {\\n uint128 initial;\\n uint128 current;\\n }\\n\\n /**\\n * @notice triggered when trading is reset for a token (dutch auction has been restarted)\\n */\\n event TradingReset(Token indexed token, Price price);\\n\\n /**\\n * @notice triggered after a successful trade is executed\\n */\\n event TokenTraded(address indexed caller, Token indexed token, uint128 sourceAmount, uint128 targetAmount);\\n\\n /**\\n * @notice triggered when the rewards ppm are updated\\n */\\n event RewardsUpdated(uint32 prevRewardsPPM, uint32 newRewardsPPM);\\n\\n /**\\n * @notice triggered when pair status is updated\\n */\\n event PairDisabledStatusUpdated(Token indexed token, bool prevStatus, bool newStatus);\\n\\n /**\\n * @notice triggered after the price updates for a token\\n */\\n event PriceUpdated(Token indexed token, Price price);\\n\\n /**\\n * @notice triggered when tokens have been withdrawn by the admin\\n */\\n event FundsWithdrawn(Token[] indexed tokens, address indexed caller, address indexed target, uint256[] amounts);\\n\\n /**\\n * @notice triggered when the price reset multiplier is updated\\n */\\n event PriceResetMultiplierUpdated(uint32 prevPriceResetMultiplier, uint32 newPriceResetMultiplier);\\n\\n /**\\n * @notice Triggered when the minimum token sale amount multiplier is updated\\n */\\n event MinTokenSaleAmountMultiplierUpdated(uint32 prevMinTokenSaleAmountMultiplier, uint32 newMinTokenSaleAmountMultiplier);\\n\\n /**\\n * @notice triggered when the price decay halflife is updated (for all tokens except the target token)\\n */\\n event PriceDecayHalfLifeUpdated(uint32 prevPriceDecayHalfLife, uint32 newPriceDecayHalfLife);\\n\\n /**\\n * @notice triggered when the price decay halflife is updated (for the target token only)\\n */\\n event TargetTokenPriceDecayHalfLifeUpdated(uint32 prevPriceDecayHalfLife, uint32 newPriceDecayHalfLife);\\n\\n /**\\n * @notice triggered when the price decay halflife on price reset is updated (for the target token only)\\n */\\n event TargetTokenPriceDecayHalfLifeOnResetUpdated(uint32 prevPriceDecayHalfLife, uint32 newPriceDecayHalfLife);\\n\\n /**\\n * @notice triggered when the target token sale amount is updated\\n */\\n event MaxTargetTokenSaleAmountUpdated(uint128 prevTargetTokenSaleAmount, uint128 newTargetTokenSaleAmount);\\n\\n /**\\n * @notice triggered when the min token sale amount is updated\\n */\\n event MinTokenSaleAmountUpdated(Token indexed token, uint128 prevMinTokenSaleAmount, uint128 newMinTokenSaleAmount);\\n\\n /**\\n * @notice triggered when the transfer address is updated\\n */\\n event TransferAddressUpdated(address indexed prevTransferAddress, address indexed newTransferAddress);\\n\\n /**\\n * @notice returns the rewards ppm\\n */\\n function rewardsPPM() external view returns (uint32);\\n \\n /**\\n * @notice returns the price reset multiplier\\n */\\n function priceResetMultiplier() external view returns (uint32);\\n \\n /**\\n * @notice returns the min token sale amount multiplier\\n */\\n function minTokenSaleAmountMultiplier() external view returns (uint32);\\n\\n /**\\n * @notice returns the price decay half-life for all tokens except the target token\\n * @notice according to the exp decay formula\\n */\\n function priceDecayHalfLife() external view returns (uint32);\\n\\n /**\\n * @notice returns the price decay half-life for the target token according to the exp decay formula\\n */\\n function targetTokenPriceDecayHalfLife() external view returns (uint32);\\n\\n /**\\n * @notice returns the price decay half-life for the target token on reset (slow) according to the exp decay formula\\n */\\n function targetTokenPriceDecayHalfLifeOnReset() external view returns (uint32);\\n\\n /**\\n * @notice returns the total target (if no final target token has been defined) or final target tokens collected \\n */\\n function totalCollected() external view returns (uint256);\\n\\n /**\\n * @notice returns the initial and current target token sale amount\\n */\\n function targetTokenSaleAmount() external view returns (SaleAmount memory);\\n\\n /**\\n * @notice returns the min target token sale amount\\n */\\n function minTargetTokenSaleAmount() external view returns (uint128);\\n\\n /**\\n * @notice returns the min token sale amount\\n */\\n function minTokenSaleAmount(Token token) external view returns (uint128);\\n\\n /**\\n * @notice returns true if pair is disabled (admin-controllable)\\n */\\n function pairDisabled(Token token) external view returns (bool);\\n\\n /**\\n * @notice returns true if trading is enabled for token (dutch auction started)\\n */\\n function tradingEnabled(Token token) external view returns (bool);\\n\\n /**\\n * @notice returns the amount available for trading for the token\\n */\\n function amountAvailableForTrading(Token token) external view returns (uint128);\\n\\n /**\\n * @notice returns the target amount expected given a source amount\\n */\\n function expectedTradeReturn(Token token, uint128 sourceAmount) external view returns (uint128);\\n\\n /**\\n * @notice returns the source amount required given a target amount\\n */\\n function expectedTradeInput(Token token, uint128 targetAmount) external view returns (uint128);\\n\\n /**\\n * @notice returns the current token price (targetToken / TKN)\\n * @notice if token == targetToken, returns finalTargetToken / targetToken price\\n */\\n function tokenPrice(Token token) external view returns (Price memory);\\n\\n /**\\n * @notice returns the total available fees for the given token\\n */\\n function availableTokens(Token token) external view returns (uint256);\\n\\n /**\\n * @notice returns the target token\\n */\\n function targetToken() external view returns (Token);\\n\\n /**\\n * @notice returns the final target token\\n */\\n function finalTargetToken() external view returns (Token);\\n\\n /**\\n * @notice returns the transfer address\\n */\\n function transferAddress() external view returns (address);\\n\\n /**\\n * @notice trades *targetToken* for *targetAmount* of *token* based on the current token price (trade by target amount)\\n * @notice if token == *targetToken*, trades *finalTargetToken* for amount of *targetToken* and also\\n * @notice resets the current token sale amount if it's below the min amount after a trade\\n * @notice reverts if source amount required is greater than maxInput\\n */\\n function trade(Token token, uint128 targetAmount, uint128 maxInput) external payable;\\n\\n /**\\n * @notice withdraws the fees of the provided token from Carbon and\\n * @notice enables trading for the token if not already enabled\\n */\\n function execute(Token[] calldata tokens) external;\\n}\\n\",\"keccak256\":\"0x938907641a0d566e275986de3fc56f7833647cbb2c54fd0d37f07baba18eec57\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n error ControllerAlreadySet();\\n error OnlyController();\\n\\n /**\\n * @dev returns the controller address\\n */\\n function controller() external view returns (address);\\n \\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xf849364f45555e654783d6df21ccefcded4175262889a316dc3e16bdf8f51f17\",\"license\":\"SEE LICENSE IN LICENSE\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162005a8838038062005a88833981016040819052620000359162000177565b81620000418162000075565b6001600160a01b0380861660805284811660a05283811660c052821660e0526200006a620000a0565b5050505050620001df565b6001600160a01b0381166200009d5760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff16156200010d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146200015f576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200009d57600080fd5b600080600080608085870312156200018e57600080fd5b84516200019b8162000161565b6020860151909450620001ae8162000161565b6040860151909350620001c18162000161565b6060860151909250620001d48162000161565b939692955090935050565b60805160a05160c05160e051615734620003546000396000818161050c0152818161100b0152818161109001528181613138015281816131bc0152818161324a015281816132bd015281816132f5015281816137ab01526138520152600081816104260152818161095901528181611059015281816110c10152818161146f01528181611b3001528181611c7c015281816123d30152818161248201528181612544015281816125b90152818161263601528181612b4d0152818161307801528181613288015281816133a90152818161340e01528181613459015281816134ba0152818161353a01528181613649015281816136cd0152818161375b015281816137dc01528181613889015281816138f40152818161393c015281816143f4015281816144410152614465015260008181610cea01528181610e2101528181610e8d0152818161163f015261167b015260008181610cc401528181610d900152818161156001526115c501526157346000f3fe6080604052600436106103015760003560e01c80639c18c7631161018f578063cb8ea538116100e1578063ea2e12e51161008a578063ef7cbc4a11610064578063ef7cbc4a146109e7578063f444fdd814610a07578063fa6ca9e814610a2657600080fd5b8063ea2e12e51461094a578063ecd844ae1461099f578063eec245e2146109c757600080fd5b8063debcf1fe116100bb578063debcf1fe146108d4578063e29eb836146108f4578063e60963f81461090a57600080fd5b8063cb8ea53814610874578063d1591fa614610894578063d547741f146108b457600080fd5b8063ac5b12ec11610143578063c735ce431161011d578063c735ce4314610818578063c7f5387414610838578063ca15c8731461085457600080fd5b8063ac5b12ec146107ac578063bedf9525146107d8578063c4d66de8146107f857600080fd5b8063a1a660a711610174578063a1a660a714610757578063a217fddf14610777578063a7ae00d21461078c57600080fd5b80639c18c763146106fd5780639dee50ea1461073757600080fd5b806354fd4d50116102535780638619c0d9116101fc57806393867fb5116101d657806393867fb51461068a57806394717ae9146106bd57806394cb0947146106dd57600080fd5b80638619c0d9146105d85780639010d07c1461062457806391d148541461064457600080fd5b80636b36b05b1161022d5780636b36b05b14610553578063824316881461057357806384ba3f69146105ab57600080fd5b806354fd4d50146104e1578063613ef7ed146104fd57806363ee9e4e1461053057600080fd5b80632f2ff15d116102b55780634b4e97ee1161028f5780634b4e97ee1461047e5780634bb69ddb146104a15780634c0a0dfa146104c157600080fd5b80632f2ff15d146103f7578063327107f71461041757806336568abe1461045e57600080fd5b80630d108f2c116102e65780630d108f2c14610377578063185a567114610399578063248a9ca3146103b957600080fd5b806301ffc9a71461030d578063035dff191461034257600080fd5b3661030857005b600080fd5b34801561031957600080fd5b5061032d610328366004614df9565b610a39565b60405190151581526020015b60405180910390f35b34801561034e57600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610339565b34801561038357600080fd5b50610397610392366004614e3b565b610a95565b005b3480156103a557600080fd5b506103976103b4366004614e76565b610adc565b3480156103c557600080fd5b506103e96103d4366004614e93565b60009081526065602052604090206001015490565b604051908152602001610339565b34801561040357600080fd5b50610397610412366004614eac565b610b12565b34801561042357600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610339565b34801561046a57600080fd5b50610397610479366004614eac565b610b3c565b34801561048a57600080fd5b5061012e54600160801b900463ffffffff16610362565b3480156104ad57600080fd5b506103976104bc366004614e3b565b610bc9565b3480156104cd57600080fd5b506103976104dc366004614f21565b610c0c565b3480156104ed57600080fd5b5060405160048152602001610339565b34801561050957600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610446565b34801561053c57600080fd5b5061012e54600160a01b900463ffffffff16610362565b34801561055f57600080fd5b5061039761056e366004614e3b565b6112b4565b34801561057f57600080fd5b5061059361058e366004614f7a565b6112f1565b6040516001600160801b039091168152602001610339565b3480156105b757600080fd5b506105cb6105c6366004614e76565b6113ac565b6040516103399190614faf565b3480156105e457600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105cb565b34801561063057600080fd5b5061044661063f366004614fd3565b6114f6565b34801561065057600080fd5b5061032d61065f366004614eac565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561069657600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103e9565b3480156106c957600080fd5b506103976106d8366004614ff5565b611515565b3480156106e957600080fd5b506103e96106f8366004614e76565b61155b565b34801561070957600080fd5b5061032d610718366004614e76565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561074357600080fd5b50610397610752366004614e3b565b6116c9565b34801561076357600080fd5b50610397610772366004615010565b61170c565b34801561078357600080fd5b506103e9600081565b34801561079857600080fd5b506105936107a7366004614f7a565b611870565b3480156107b857600080fd5b5061012e546c01000000000000000000000000900463ffffffff16610362565b3480156107e457600080fd5b5061032d6107f3366004614e76565b611917565b34801561080457600080fd5b50610397610813366004614e76565b61193e565b34801561082457600080fd5b506103976108333660046150a3565b611a60565b34801561084457600080fd5b5061012e5463ffffffff16610362565b34801561086057600080fd5b506103e961086f366004614e93565b611a94565b34801561088057600080fd5b5061039761088f366004614e3b565b611aab565b3480156108a057600080fd5b506103976108af366004614ff5565b611aee565b3480156108c057600080fd5b506103976108cf366004614eac565b611b55565b3480156108e057600080fd5b506103976108ef3660046150d1565b611b7a565b34801561090057600080fd5b5061012d546103e9565b34801561091657600080fd5b50610593610925366004614e76565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561095657600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610593565b3480156109ab57600080fd5b5061012e5468010000000000000000900463ffffffff16610362565b3480156109d357600080fd5b506105936109e2366004614e76565b611c01565b3480156109f357600080fd5b50610397610a02366004614e3b565b611c0c565b348015610a1357600080fd5b50610134546001600160a01b0316610446565b610397610a34366004615156565b611c4f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a8f5750610a8f82611d2d565b92915050565b610abf7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff16610acf81611e20565b610ad882611e5a565b5050565b610b067f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b610b0f81611ef1565b50565b600082815260656020526040902060010154610b2d81611f77565b610b378383611f81565b505050565b6001600160a01b0381163314610bbf5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610ad88282611fa3565b610bf37f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff16610c0381611e20565b610ad882611fc5565b610c1461205e565b8181610c2082826120b7565b8260008167ffffffffffffffff811115610c3c57610c3c61519b565b604051908082528060200260200182016040528015610c65578160200160208202803683370190505b50905060008267ffffffffffffffff811115610c8357610c8361519b565b604051908082528060200260200182016040528015610cac578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610f4e5760008b8b83818110610d2b57610d2b6151b1565b9050602002016020810190610d409190614e76565b905060008415610e0a576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610dd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfd91906151c7565b610e0790826151f6565b90505b8315610efb576000610e456001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612201565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610ed357600080fd5b505af1158015610ee7573d6000803e3d6000fd5b505050508082610ef791906151f6565b9150505b80888481518110610f0e57610f0e6151b1565b6020908102919091010152610f278187620f42406122a8565b878481518110610f3957610f396151b1565b60209081029190910101525050600101610d0f565b5060005b868110156112625760008b8b83818110610f6e57610f6e6151b1565b9050602002016020810190610f839190614e76565b90506000878381518110610f9957610f996151b1565b602002602001015190506000878481518110610fb757610fb76151b1565b6020026020010151905060008183610fcf9190615209565b9050821580610ff757506001600160a01b038416600090815261012f602052604090205460ff165b15611005575050505061125a565b61103b847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b156110535761104a8482612383565b5050505061125a565b611089847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611166577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166110eb576110e67f000000000000000000000000000000000000000000000000000000000000000082612383565b611255565b6001600160a01b0384166000908152610130602052604090205463ffffffff16158061114957506001600160a01b038416600090815261013260205260409020546001600160801b031661113e856123cb565b6001600160801b0316105b8061115857506111588461243c565b156110e6576110e682612506565b6000611171856123cb565b905061119b856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b15806111d757506001600160a01b038516600090815261013260205260409020546001600160801b03908116906111d59084908416615209565b105b8061123557506001600160a01b0385166000908152610132602052604090205461012e54611220916001600160801b03169068010000000000000000900463ffffffff1661521c565b6001600160801b0316816001600160801b0316115b8061124457506112448561243c565b15611253576112538584612699565b505b505050505b600101610f52565b506112a2338b8b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612794915050565b5050505050505050610ad8600160fb55565b6112de7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b806112e88161280c565b610ad88261284f565b6000826112fd816128bb565b6000611308856113ac565b905061131381612965565b600061134b61134683602001516001600160801b0316876001600160801b031685600001516001600160801b03166122a8565b6129bd565b9050611356866123cb565b6001600160801b0316816001600160801b031611156113a1576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff169081900361141a576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114268242615247565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f000000000000000000000000000000000000000000000000000000000000000016146114aa5761012e54600160a01b900463ffffffff166114c5565b61012e546c01000000000000000000000000900463ffffffff165b90506114e261134683600001516001600160801b03168584612a40565b6001600160801b0316825250949350505050565b600082815260976020526040812061150e9083612ac8565b9392505050565b61153f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b806001600160801b031661155281611e20565b610ad882612ad4565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161561163d576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa15801561160c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163091906151c7565b61163a90826151f6565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316156116ac5761169f6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612201565b6116a990826151f6565b90505b6116bf6001600160a01b03841630612201565b61150e90826151f6565b6116f37f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff1661170381611e20565b610ad882612be1565b8261171681612c78565b858561172282826120b7565b61172a61205e565b6117547f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8684811461178e576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156117f5576117ed888888848181106117af576117af6151b1565b905060200201358c8c858181106117c8576117c86151b1565b90506020020160208101906117dd9190614e76565b6001600160a01b03169190612cb8565b600101611791565b50866001600160a01b0316336001600160a01b03168a8a60405161181a929190615264565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516118539291906152a6565b60405180910390a450611866600160fb55565b5050505050505050565b60008261187c816128bb565b611885846123cb565b6001600160801b0316836001600160801b031611156118d0576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006118db856113ac565b90506118e681612965565b6113a161134682600001516001600160801b0316866001600160801b031684602001516001600160801b0316612cfa565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a8f565b600054610100900460ff161580801561195e5750600054600160ff909116105b806119785750303b158015611978575060005460ff166001145b6119ea5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bb6565b6000805460ff191660011790558015611a0d576000805461ff0019166101001790555b611a1682612d51565b8015610ad8576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b611a8a7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b610ad88282612dd5565b6000818152609760205260408120610a8f90612e61565b611ad57f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff16611ae581611e20565b610ad882612e6b565b611b187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b806001600160801b0316611b2b81611e20565b610ad87f000000000000000000000000000000000000000000000000000000000000000083612f0c565b600082815260656020526040902060010154611b7081611f77565b610b378383611fa3565b60c954600090611b8f9061ffff1660016152f8565b90506004848015611ba857508061ffff168261ffff1614155b15611bdf576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611be8578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a8f826123cb565b611c367f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff16611c4681611e20565b610ad882612fc7565b611c5761205e565b82611c61816128bb565b826001600160801b0316611c7481611e20565b6000611cac867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611cc257611cbb8585613070565b9050611cd0565b611ccd8686866135a1565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610b37600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a8f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a8f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610ad8576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610b0f576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e7a575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c39101611a54565b610134546001600160a01b039081169082168103611f0d575050565b61013480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384811691821790925560405190918316907f0c752b9b11fd9a446c76e6b4cec603d51f2dc603428e800999192409062cbabe90600090a35050565b610b0f81336139a1565b611f8b8282613a16565b6000828152609760205260409020610b379082613ab8565b611fad8282613acd565b6000828152609760205260409020610b379082613b50565b61012e5463ffffffff64010000000090910481169082168103611fe6575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611a54565b600260fb54036120b05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bb6565b600260fb55565b8060008190036120f3576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156121fb576000848483818110612112576121126151b1565b90506020020160208101906121279190614e76565b90506001600160a01b038116612169576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b838110156121f1576121b28287878481811061218c5761218c6151b1565b90506020020160208101906121a19190614e76565b6001600160a01b0390811691161490565b156121e9576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60010161216e565b50506001016120f6565b50505050565b600061220c83613b65565b1561222257506001600160a01b03811631610a8f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015612284573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150e91906151c7565b60008060006122b78686613b8c565b91509150816000036122dc578381816122d2576122d2615313565b049250505061150e565b8382106122fc57604051631a93c68960e11b815260040160405180910390fd5b6000612309878787613bc7565b9050600080612319858585613be2565b91509150816000036123415786818161233457612334615313565b049550505050505061150e565b6000878103881690612354848484613c12565b90506000612370838b8161236a5761236a615313565b04613c4f565b919091029b9a5050505050505050505050565b8061012d600082825461239691906151f6565b9091555050610134546001600160a01b03166123b0575050565b61013454610ad8906001600160a01b03848116911683612cb8565b6000612403827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561242157505061013354600160801b90046001600160801b031690565b610a8f6113466001600160a01b03841630612201565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361246c5750600092915050565b60006124788242615247565b905060006124b2857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6124cc5761012e54600160a01b900463ffffffff166124e7565b61012e546c01000000000000000000000000900463ffffffff165b905060806124f58284615329565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b02939094169290921790925590506125fb611346836125df6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612201565b6125e99190615209565b610133546001600160801b0316613c70565b61013380546001600160801b03928316600160801b02921691909117905561012e546126349063ffffffff600160a01b90910416612fc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b954668260405161268d9190614faf565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061274e83600261273f856127356001600160a01b03851630612201565b6113469190615209565b612749919061534c565b612f0c565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516127879190614faf565b60405180910390a2505050565b815160005b81811015611bfa5760008482815181106127b5576127b56151b1565b6020026020010151905060008483815181106127d3576127d36151b1565b602002602001015190506127fb8782846001600160a01b0316612cb89092919063ffffffff16565b5050600101612799565b600160fb55565b620f424063ffffffff82161115610b0f576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612868575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611a54565b6001600160a01b0381166000908152610130602052604090205463ffffffff16612911576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff1615610b0f576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b03161580612987575060208101516001600160801b0316155b15610b0f576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b03821115612a3c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610bb6565b5090565b600080612a4d8385615329565b63ffffffff1690506000612a618486615366565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a9382613c86565b9050612abc888260200151866002612aab919061556b565b8451612ab79190615577565b6122a8565b98975050505050505050565b600061150e8383614064565b610133546001600160801b039081169082168103612af0575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612ba157612b82611346612b736001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612201565b846001600160801b0316613c70565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611a54565b61012e5463ffffffff600160801b90910481169082168103612c01575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611a54565b6001600160a01b038116610b0f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003612cc557505050565b612cce83613b65565b15612ce657610b376001600160a01b0383168261408e565b610b376001600160a01b03841683836141a7565b600080612d088585856122a8565b90506000612d17868686613bc7565b1115612d49576000198110612d3f57604051631a93c68960e11b815260040160405180910390fd5b600101905061150e565b949350505050565b600054610100900460ff16612dbc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b612dc4614250565b612dcc6142cd565b610b0f81614340565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612e0257505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff9101612787565b6000610a8f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612e90575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611a54565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612f3f57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f9101612787565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ff0575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611a54565b60008061309d7f000000000000000000000000000000000000000000000000000000000000000085611870565b9050806001600160801b03166000036130e2576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561312e576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415801561317b5750600034115b156131b2576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156132065750806001600160801b031634105b1561323d576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61327b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166144a8565b6132b86001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b038716612cb8565b6132eb7f0000000000000000000000000000000000000000000000000000000000000000826001600160801b0316612383565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14801561333f5750806001600160801b031634115b156133615761336161335a6001600160801b03831634615209565b339061408e565b6101338054859190601090613387908490600160801b90046001600160801b031661558e565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b9091049091161015905061150e576134346113466125e96001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612201565b61013380546001600160801b03928316600160801b029216919091179055600061347d7f00000000000000000000000000000000000000000000000000000000000000006113ac565b61012e548151919250640100000000900463ffffffff169082906134a290839061521c565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461353893509190910416612fc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b826040516135919190614faf565b60405180910390a2509392505050565b6000806135ae8585611870565b9050806001600160801b03166000036135f3576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561363f576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415801561368c5750600034115b156136c3576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156137175750806001600160801b031634105b1561374e576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61378c6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166144a8565b6137a96001600160a01b038616336001600160801b0387166144d2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661380a5761380a7f0000000000000000000000000000000000000000000000000000000000000000826001600160801b0316612383565b6001600160a01b038516600090815261013260205260409020546001600160801b0316613836866123cb565b6001600160801b0316101561385057613850856000612699565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615801590613923575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546138e69168010000000000000000900463ffffffff16906001600160801b031661534c565b6001600160801b03166139187f00000000000000000000000000000000000000000000000000000000000000006123cb565b6001600160801b0316105b15613932576139326000612506565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156139865750806001600160801b031634115b15612d4957612d4961335a6001600160801b03831634615209565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610ad8576139d481614523565b6139df836020614535565b6040516020016139f09291906155d2565b60408051601f198184030181529082905262461bcd60e51b8252610bb691600401615653565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610ad85760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613a743390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061150e836001600160a01b03841661475e565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610ad85760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061150e836001600160a01b0384166147ad565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a8f565b6000806000613b9b85856148a0565b9050848402808210613bb4579081900392509050613bc0565b60018183030393509150505b9250929050565b60008180613bd757613bd7615313565b838509949350505050565b600080828410613bf85750839050818303613c0a565b613c03600186615209565b9150508183035b935093915050565b600080613c308380830381613c2957613c29615313565b0460010190565b9050828481613c4157613c41615313565b048186021795945050505050565b60006001815b60088110156113a55783820260020382029150600101613c55565b6000818310613c7f578161150e565b5090919050565b60408051808201909152600080825260208201526000613cbf6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516122a8565b9050600080807008000000000000000000000000000000008410613cf657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f10000000000000000000000000000000841615613edb5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f20000000000000000000000000000000841615613f1d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f40000000000000000000000000000000841615613f5e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b841615613f92576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615613fc6576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614006576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614044576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b600082600001828154811061407b5761407b6151b1565b9060005260206000200154905092915050565b804710156140de5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bb6565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461412b576040519150601f19603f3d011682016040523d82523d6000602084013e614130565b606091505b5050905080610b375760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bb6565b6040516001600160a01b038316602482015260448101829052610b379084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526148af565b600054610100900460ff166142bb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b6142c3614997565b6142cb614a02565b565b600054610100900460ff166143385760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b6142cb614acf565b600054610100900460ff166143ab5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b6143b66103e861284f565b6143c06002611fc5565b6143ca6004612e6b565b6143d561a8c0611e5a565b6143e061a8c0612fc7565b6143ec620d2f00612be1565b61443c6144217f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614b3a565b61442c90600a615686565b61443790606461521c565b612ad4565b610b067f00000000000000000000000000000000000000000000000000000000000000006144927f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614b3a565b61449d90600a615686565b61274990600a61521c565b8015806144b957506144b984613b65565b6121fb576121fb6001600160a01b038516848484614bb4565b806000036144df57505050565b6144e883613b65565b15612ce6576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121fb573d6000803e3d6000fd5b6060610a8f6001600160a01b03831660145b60606000614544836002615577565b61454f9060026151f6565b67ffffffffffffffff8111156145675761456761519b565b6040519080825280601f01601f191660200182016040528015614591576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106145c8576145c86151b1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061462b5761462b6151b1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000614667846002615577565b6146729060016151f6565b90505b600181111561470f577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106146b3576146b36151b1565b1a60f81b8282815181106146c9576146c96151b1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936147088161569e565b9050614675565b50831561150e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bb6565b60008181526001830160205260408120546147a557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a8f565b506000610a8f565b600081815260018301602052604081205480156148965760006147d1600183615209565b85549091506000906147e590600190615209565b905081811461484a576000866000018281548110614805576148056151b1565b9060005260206000200154905080876000018481548110614828576148286151b1565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061485b5761485b6156b5565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a8f565b6000915050610a8f565b60006000198284099392505050565b6000614904826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614c059092919063ffffffff16565b905080516000148061492557508080602001905181019061492591906156cb565b610b375760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610bb6565b600054610100900460ff166142cb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b600054610100900460ff16614a6d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b60c9805461ffff19166004179055614aa57f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614c14565b6142cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614c5f565b600054610100900460ff166128055760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b6000614b4582613b65565b15614b5257506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614b90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8f91906156e8565b6040516001600160a01b03808516602483015283166044820152606481018290526121fb9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016141ec565b6060612d498484600085614c69565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610ad88282611f81565b606082471015614ce15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610bb6565b600080866001600160a01b03168587604051614cfd919061570b565b60006040518083038185875af1925050503d8060008114614d3a576040519150601f19603f3d011682016040523d82523d6000602084013e614d3f565b606091505b5091509150614d5087838387614d5b565b979650505050505050565b60608315614dca578251600003614dc3576001600160a01b0385163b614dc35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bb6565b5081612d49565b612d498383815115614ddf5781518083602001fd5b8060405162461bcd60e51b8152600401610bb69190615653565b600060208284031215614e0b57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461150e57600080fd5b600060208284031215614e4d57600080fd5b813563ffffffff8116811461150e57600080fd5b6001600160a01b0381168114610b0f57600080fd5b600060208284031215614e8857600080fd5b813561150e81614e61565b600060208284031215614ea557600080fd5b5035919050565b60008060408385031215614ebf57600080fd5b823591506020830135614ed181614e61565b809150509250929050565b60008083601f840112614eee57600080fd5b50813567ffffffffffffffff811115614f0657600080fd5b6020830191508360208260051b8501011115613bc057600080fd5b60008060208385031215614f3457600080fd5b823567ffffffffffffffff811115614f4b57600080fd5b614f5785828601614edc565b90969095509350505050565b80356001600160801b038116811461243757600080fd5b60008060408385031215614f8d57600080fd5b8235614f9881614e61565b9150614fa660208401614f63565b90509250929050565b60408101610a8f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614fe657600080fd5b50508035926020909101359150565b60006020828403121561500757600080fd5b61150e82614f63565b60008060008060006060868803121561502857600080fd5b853567ffffffffffffffff8082111561504057600080fd5b61504c89838a01614edc565b90975095506020880135915061506182614e61565b9093506040870135908082111561507757600080fd5b5061508488828901614edc565b969995985093965092949392505050565b8015158114610b0f57600080fd5b600080604083850312156150b657600080fd5b82356150c181614e61565b91506020830135614ed181615095565b6000806000604084860312156150e657600080fd5b83356150f181615095565b9250602084013567ffffffffffffffff8082111561510e57600080fd5b818601915086601f83011261512257600080fd5b81358181111561513157600080fd5b87602082850101111561514357600080fd5b6020830194508093505050509250925092565b60008060006060848603121561516b57600080fd5b833561517681614e61565b925061518460208501614f63565b915061519260408501614f63565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156151d957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a8f57610a8f6151e0565b81810381811115610a8f57610a8f6151e0565b6001600160801b0381811683821602808216919082811461523f5761523f6151e0565b505092915050565b63ffffffff8281168282160390808211156113a5576113a56151e0565b60008184825b8581101561529b57813561527d81614e61565b6001600160a01b03168352602092830192919091019060010161526a565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156152df57600080fd5b8260051b80856040850137919091016040019392505050565b61ffff8181168382160190808211156113a5576113a56151e0565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061534057615340615313565b92169190910492915050565b60006001600160801b038084168061534057615340615313565b600063ffffffff8084168061537d5761537d615313565b92169190910692915050565b600181815b808511156153c45781600019048211156153aa576153aa6151e0565b808516156153b757918102915b93841c939080029061538e565b509250929050565b600181815b808511156153c457816001600160801b03048211156153f2576153f26151e0565b808516156153ff57918102915b93841c93908002906153d1565b60008261541b57506001610a8f565b8161542857506000610a8f565b816001811461543e576002811461544857615464565b6001915050610a8f565b60ff841115615459576154596151e0565b50506001821b610a8f565b5060208310610133831016604e8410600b8410161715615487575081810a610a8f565b6154918383615389565b80600019048211156154a5576154a56151e0565b029392505050565b6000826154bc57506001610a8f565b816154c957506000610a8f565b816001811461543e576002810361550e5760ff8411156154eb576154eb6151e0565b6001841b91506001600160801b03821115615508576155086151e0565b50610a8f565b5060208310610133831016604e8410600b8410161715615548575081810a6001600160801b03811115615543576155436151e0565b610a8f565b61555283836153cc565b806001600160801b03048211156154a5576154a56151e0565b600061150e838361540c565b8082028115828204841417610a8f57610a8f6151e0565b6001600160801b038281168282160390808211156113a5576113a56151e0565b60005b838110156155c95781810151838201526020016155b1565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161560a8160178501602088016155ae565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516156478160288401602088016155ae565b01602801949350505050565b60208152600082518060208401526156728160408501602087016155ae565b601f01601f19169190910160400192915050565b600061150e60ff84166001600160801b0384166154ad565b6000816156ad576156ad6151e0565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6000602082840312156156dd57600080fd5b815161150e81615095565b6000602082840312156156fa57600080fd5b815160ff8116811461150e57600080fd5b6000825161571d8184602087016155ae565b919091019291505056fea164736f6c6343000813000a", + "deployedBytecode": "0x6080604052600436106103015760003560e01c80639c18c7631161018f578063cb8ea538116100e1578063ea2e12e51161008a578063ef7cbc4a11610064578063ef7cbc4a146109e7578063f444fdd814610a07578063fa6ca9e814610a2657600080fd5b8063ea2e12e51461094a578063ecd844ae1461099f578063eec245e2146109c757600080fd5b8063debcf1fe116100bb578063debcf1fe146108d4578063e29eb836146108f4578063e60963f81461090a57600080fd5b8063cb8ea53814610874578063d1591fa614610894578063d547741f146108b457600080fd5b8063ac5b12ec11610143578063c735ce431161011d578063c735ce4314610818578063c7f5387414610838578063ca15c8731461085457600080fd5b8063ac5b12ec146107ac578063bedf9525146107d8578063c4d66de8146107f857600080fd5b8063a1a660a711610174578063a1a660a714610757578063a217fddf14610777578063a7ae00d21461078c57600080fd5b80639c18c763146106fd5780639dee50ea1461073757600080fd5b806354fd4d50116102535780638619c0d9116101fc57806393867fb5116101d657806393867fb51461068a57806394717ae9146106bd57806394cb0947146106dd57600080fd5b80638619c0d9146105d85780639010d07c1461062457806391d148541461064457600080fd5b80636b36b05b1161022d5780636b36b05b14610553578063824316881461057357806384ba3f69146105ab57600080fd5b806354fd4d50146104e1578063613ef7ed146104fd57806363ee9e4e1461053057600080fd5b80632f2ff15d116102b55780634b4e97ee1161028f5780634b4e97ee1461047e5780634bb69ddb146104a15780634c0a0dfa146104c157600080fd5b80632f2ff15d146103f7578063327107f71461041757806336568abe1461045e57600080fd5b80630d108f2c116102e65780630d108f2c14610377578063185a567114610399578063248a9ca3146103b957600080fd5b806301ffc9a71461030d578063035dff191461034257600080fd5b3661030857005b600080fd5b34801561031957600080fd5b5061032d610328366004614df9565b610a39565b60405190151581526020015b60405180910390f35b34801561034e57600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610339565b34801561038357600080fd5b50610397610392366004614e3b565b610a95565b005b3480156103a557600080fd5b506103976103b4366004614e76565b610adc565b3480156103c557600080fd5b506103e96103d4366004614e93565b60009081526065602052604090206001015490565b604051908152602001610339565b34801561040357600080fd5b50610397610412366004614eac565b610b12565b34801561042357600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610339565b34801561046a57600080fd5b50610397610479366004614eac565b610b3c565b34801561048a57600080fd5b5061012e54600160801b900463ffffffff16610362565b3480156104ad57600080fd5b506103976104bc366004614e3b565b610bc9565b3480156104cd57600080fd5b506103976104dc366004614f21565b610c0c565b3480156104ed57600080fd5b5060405160048152602001610339565b34801561050957600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610446565b34801561053c57600080fd5b5061012e54600160a01b900463ffffffff16610362565b34801561055f57600080fd5b5061039761056e366004614e3b565b6112b4565b34801561057f57600080fd5b5061059361058e366004614f7a565b6112f1565b6040516001600160801b039091168152602001610339565b3480156105b757600080fd5b506105cb6105c6366004614e76565b6113ac565b6040516103399190614faf565b3480156105e457600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105cb565b34801561063057600080fd5b5061044661063f366004614fd3565b6114f6565b34801561065057600080fd5b5061032d61065f366004614eac565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561069657600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103e9565b3480156106c957600080fd5b506103976106d8366004614ff5565b611515565b3480156106e957600080fd5b506103e96106f8366004614e76565b61155b565b34801561070957600080fd5b5061032d610718366004614e76565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561074357600080fd5b50610397610752366004614e3b565b6116c9565b34801561076357600080fd5b50610397610772366004615010565b61170c565b34801561078357600080fd5b506103e9600081565b34801561079857600080fd5b506105936107a7366004614f7a565b611870565b3480156107b857600080fd5b5061012e546c01000000000000000000000000900463ffffffff16610362565b3480156107e457600080fd5b5061032d6107f3366004614e76565b611917565b34801561080457600080fd5b50610397610813366004614e76565b61193e565b34801561082457600080fd5b506103976108333660046150a3565b611a60565b34801561084457600080fd5b5061012e5463ffffffff16610362565b34801561086057600080fd5b506103e961086f366004614e93565b611a94565b34801561088057600080fd5b5061039761088f366004614e3b565b611aab565b3480156108a057600080fd5b506103976108af366004614ff5565b611aee565b3480156108c057600080fd5b506103976108cf366004614eac565b611b55565b3480156108e057600080fd5b506103976108ef3660046150d1565b611b7a565b34801561090057600080fd5b5061012d546103e9565b34801561091657600080fd5b50610593610925366004614e76565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561095657600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610593565b3480156109ab57600080fd5b5061012e5468010000000000000000900463ffffffff16610362565b3480156109d357600080fd5b506105936109e2366004614e76565b611c01565b3480156109f357600080fd5b50610397610a02366004614e3b565b611c0c565b348015610a1357600080fd5b50610134546001600160a01b0316610446565b610397610a34366004615156565b611c4f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a8f5750610a8f82611d2d565b92915050565b610abf7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff16610acf81611e20565b610ad882611e5a565b5050565b610b067f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b610b0f81611ef1565b50565b600082815260656020526040902060010154610b2d81611f77565b610b378383611f81565b505050565b6001600160a01b0381163314610bbf5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610ad88282611fa3565b610bf37f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff16610c0381611e20565b610ad882611fc5565b610c1461205e565b8181610c2082826120b7565b8260008167ffffffffffffffff811115610c3c57610c3c61519b565b604051908082528060200260200182016040528015610c65578160200160208202803683370190505b50905060008267ffffffffffffffff811115610c8357610c8361519b565b604051908082528060200260200182016040528015610cac578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610f4e5760008b8b83818110610d2b57610d2b6151b1565b9050602002016020810190610d409190614e76565b905060008415610e0a576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610dd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfd91906151c7565b610e0790826151f6565b90505b8315610efb576000610e456001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612201565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610ed357600080fd5b505af1158015610ee7573d6000803e3d6000fd5b505050508082610ef791906151f6565b9150505b80888481518110610f0e57610f0e6151b1565b6020908102919091010152610f278187620f42406122a8565b878481518110610f3957610f396151b1565b60209081029190910101525050600101610d0f565b5060005b868110156112625760008b8b83818110610f6e57610f6e6151b1565b9050602002016020810190610f839190614e76565b90506000878381518110610f9957610f996151b1565b602002602001015190506000878481518110610fb757610fb76151b1565b6020026020010151905060008183610fcf9190615209565b9050821580610ff757506001600160a01b038416600090815261012f602052604090205460ff165b15611005575050505061125a565b61103b847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b156110535761104a8482612383565b5050505061125a565b611089847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611166577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166110eb576110e67f000000000000000000000000000000000000000000000000000000000000000082612383565b611255565b6001600160a01b0384166000908152610130602052604090205463ffffffff16158061114957506001600160a01b038416600090815261013260205260409020546001600160801b031661113e856123cb565b6001600160801b0316105b8061115857506111588461243c565b156110e6576110e682612506565b6000611171856123cb565b905061119b856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b15806111d757506001600160a01b038516600090815261013260205260409020546001600160801b03908116906111d59084908416615209565b105b8061123557506001600160a01b0385166000908152610132602052604090205461012e54611220916001600160801b03169068010000000000000000900463ffffffff1661521c565b6001600160801b0316816001600160801b0316115b8061124457506112448561243c565b15611253576112538584612699565b505b505050505b600101610f52565b506112a2338b8b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612794915050565b5050505050505050610ad8600160fb55565b6112de7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b806112e88161280c565b610ad88261284f565b6000826112fd816128bb565b6000611308856113ac565b905061131381612965565b600061134b61134683602001516001600160801b0316876001600160801b031685600001516001600160801b03166122a8565b6129bd565b9050611356866123cb565b6001600160801b0316816001600160801b031611156113a1576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff169081900361141a576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114268242615247565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f000000000000000000000000000000000000000000000000000000000000000016146114aa5761012e54600160a01b900463ffffffff166114c5565b61012e546c01000000000000000000000000900463ffffffff165b90506114e261134683600001516001600160801b03168584612a40565b6001600160801b0316825250949350505050565b600082815260976020526040812061150e9083612ac8565b9392505050565b61153f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b806001600160801b031661155281611e20565b610ad882612ad4565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161561163d576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa15801561160c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163091906151c7565b61163a90826151f6565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316156116ac5761169f6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612201565b6116a990826151f6565b90505b6116bf6001600160a01b03841630612201565b61150e90826151f6565b6116f37f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff1661170381611e20565b610ad882612be1565b8261171681612c78565b858561172282826120b7565b61172a61205e565b6117547f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8684811461178e576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156117f5576117ed888888848181106117af576117af6151b1565b905060200201358c8c858181106117c8576117c86151b1565b90506020020160208101906117dd9190614e76565b6001600160a01b03169190612cb8565b600101611791565b50866001600160a01b0316336001600160a01b03168a8a60405161181a929190615264565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516118539291906152a6565b60405180910390a450611866600160fb55565b5050505050505050565b60008261187c816128bb565b611885846123cb565b6001600160801b0316836001600160801b031611156118d0576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006118db856113ac565b90506118e681612965565b6113a161134682600001516001600160801b0316866001600160801b031684602001516001600160801b0316612cfa565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a8f565b600054610100900460ff161580801561195e5750600054600160ff909116105b806119785750303b158015611978575060005460ff166001145b6119ea5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bb6565b6000805460ff191660011790558015611a0d576000805461ff0019166101001790555b611a1682612d51565b8015610ad8576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b611a8a7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b610ad88282612dd5565b6000818152609760205260408120610a8f90612e61565b611ad57f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff16611ae581611e20565b610ad882612e6b565b611b187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b806001600160801b0316611b2b81611e20565b610ad87f000000000000000000000000000000000000000000000000000000000000000083612f0c565b600082815260656020526040902060010154611b7081611f77565b610b378383611fa3565b60c954600090611b8f9061ffff1660016152f8565b90506004848015611ba857508061ffff168261ffff1614155b15611bdf576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611be8578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a8f826123cb565b611c367f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611dc4565b8063ffffffff16611c4681611e20565b610ad882612fc7565b611c5761205e565b82611c61816128bb565b826001600160801b0316611c7481611e20565b6000611cac867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611cc257611cbb8585613070565b9050611cd0565b611ccd8686866135a1565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610b37600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a8f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a8f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610ad8576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610b0f576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e7a575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c39101611a54565b610134546001600160a01b039081169082168103611f0d575050565b61013480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384811691821790925560405190918316907f0c752b9b11fd9a446c76e6b4cec603d51f2dc603428e800999192409062cbabe90600090a35050565b610b0f81336139a1565b611f8b8282613a16565b6000828152609760205260409020610b379082613ab8565b611fad8282613acd565b6000828152609760205260409020610b379082613b50565b61012e5463ffffffff64010000000090910481169082168103611fe6575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611a54565b600260fb54036120b05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bb6565b600260fb55565b8060008190036120f3576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156121fb576000848483818110612112576121126151b1565b90506020020160208101906121279190614e76565b90506001600160a01b038116612169576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b838110156121f1576121b28287878481811061218c5761218c6151b1565b90506020020160208101906121a19190614e76565b6001600160a01b0390811691161490565b156121e9576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60010161216e565b50506001016120f6565b50505050565b600061220c83613b65565b1561222257506001600160a01b03811631610a8f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015612284573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150e91906151c7565b60008060006122b78686613b8c565b91509150816000036122dc578381816122d2576122d2615313565b049250505061150e565b8382106122fc57604051631a93c68960e11b815260040160405180910390fd5b6000612309878787613bc7565b9050600080612319858585613be2565b91509150816000036123415786818161233457612334615313565b049550505050505061150e565b6000878103881690612354848484613c12565b90506000612370838b8161236a5761236a615313565b04613c4f565b919091029b9a5050505050505050505050565b8061012d600082825461239691906151f6565b9091555050610134546001600160a01b03166123b0575050565b61013454610ad8906001600160a01b03848116911683612cb8565b6000612403827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561242157505061013354600160801b90046001600160801b031690565b610a8f6113466001600160a01b03841630612201565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361246c5750600092915050565b60006124788242615247565b905060006124b2857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6124cc5761012e54600160a01b900463ffffffff166124e7565b61012e546c01000000000000000000000000900463ffffffff165b905060806124f58284615329565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b02939094169290921790925590506125fb611346836125df6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612201565b6125e99190615209565b610133546001600160801b0316613c70565b61013380546001600160801b03928316600160801b02921691909117905561012e546126349063ffffffff600160a01b90910416612fc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b954668260405161268d9190614faf565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061274e83600261273f856127356001600160a01b03851630612201565b6113469190615209565b612749919061534c565b612f0c565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516127879190614faf565b60405180910390a2505050565b815160005b81811015611bfa5760008482815181106127b5576127b56151b1565b6020026020010151905060008483815181106127d3576127d36151b1565b602002602001015190506127fb8782846001600160a01b0316612cb89092919063ffffffff16565b5050600101612799565b600160fb55565b620f424063ffffffff82161115610b0f576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612868575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611a54565b6001600160a01b0381166000908152610130602052604090205463ffffffff16612911576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff1615610b0f576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b03161580612987575060208101516001600160801b0316155b15610b0f576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b03821115612a3c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610bb6565b5090565b600080612a4d8385615329565b63ffffffff1690506000612a618486615366565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a9382613c86565b9050612abc888260200151866002612aab919061556b565b8451612ab79190615577565b6122a8565b98975050505050505050565b600061150e8383614064565b610133546001600160801b039081169082168103612af0575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612ba157612b82611346612b736001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612201565b846001600160801b0316613c70565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611a54565b61012e5463ffffffff600160801b90910481169082168103612c01575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611a54565b6001600160a01b038116610b0f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003612cc557505050565b612cce83613b65565b15612ce657610b376001600160a01b0383168261408e565b610b376001600160a01b03841683836141a7565b600080612d088585856122a8565b90506000612d17868686613bc7565b1115612d49576000198110612d3f57604051631a93c68960e11b815260040160405180910390fd5b600101905061150e565b949350505050565b600054610100900460ff16612dbc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b612dc4614250565b612dcc6142cd565b610b0f81614340565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612e0257505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff9101612787565b6000610a8f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612e90575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611a54565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612f3f57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f9101612787565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ff0575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611a54565b60008061309d7f000000000000000000000000000000000000000000000000000000000000000085611870565b9050806001600160801b03166000036130e2576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561312e576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415801561317b5750600034115b156131b2576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156132065750806001600160801b031634105b1561323d576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61327b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166144a8565b6132b86001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b038716612cb8565b6132eb7f0000000000000000000000000000000000000000000000000000000000000000826001600160801b0316612383565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14801561333f5750806001600160801b031634115b156133615761336161335a6001600160801b03831634615209565b339061408e565b6101338054859190601090613387908490600160801b90046001600160801b031661558e565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b9091049091161015905061150e576134346113466125e96001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612201565b61013380546001600160801b03928316600160801b029216919091179055600061347d7f00000000000000000000000000000000000000000000000000000000000000006113ac565b61012e548151919250640100000000900463ffffffff169082906134a290839061521c565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461353893509190910416612fc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b826040516135919190614faf565b60405180910390a2509392505050565b6000806135ae8585611870565b9050806001600160801b03166000036135f3576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561363f576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415801561368c5750600034115b156136c3576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156137175750806001600160801b031634105b1561374e576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61378c6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166144a8565b6137a96001600160a01b038616336001600160801b0387166144d2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661380a5761380a7f0000000000000000000000000000000000000000000000000000000000000000826001600160801b0316612383565b6001600160a01b038516600090815261013260205260409020546001600160801b0316613836866123cb565b6001600160801b0316101561385057613850856000612699565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615801590613923575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546138e69168010000000000000000900463ffffffff16906001600160801b031661534c565b6001600160801b03166139187f00000000000000000000000000000000000000000000000000000000000000006123cb565b6001600160801b0316105b15613932576139326000612506565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156139865750806001600160801b031634115b15612d4957612d4961335a6001600160801b03831634615209565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610ad8576139d481614523565b6139df836020614535565b6040516020016139f09291906155d2565b60408051601f198184030181529082905262461bcd60e51b8252610bb691600401615653565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610ad85760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613a743390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061150e836001600160a01b03841661475e565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610ad85760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061150e836001600160a01b0384166147ad565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a8f565b6000806000613b9b85856148a0565b9050848402808210613bb4579081900392509050613bc0565b60018183030393509150505b9250929050565b60008180613bd757613bd7615313565b838509949350505050565b600080828410613bf85750839050818303613c0a565b613c03600186615209565b9150508183035b935093915050565b600080613c308380830381613c2957613c29615313565b0460010190565b9050828481613c4157613c41615313565b048186021795945050505050565b60006001815b60088110156113a55783820260020382029150600101613c55565b6000818310613c7f578161150e565b5090919050565b60408051808201909152600080825260208201526000613cbf6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516122a8565b9050600080807008000000000000000000000000000000008410613cf657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f10000000000000000000000000000000841615613edb5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f20000000000000000000000000000000841615613f1d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f40000000000000000000000000000000841615613f5e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b841615613f92576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615613fc6576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614006576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614044576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b600082600001828154811061407b5761407b6151b1565b9060005260206000200154905092915050565b804710156140de5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bb6565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461412b576040519150601f19603f3d011682016040523d82523d6000602084013e614130565b606091505b5050905080610b375760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bb6565b6040516001600160a01b038316602482015260448101829052610b379084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526148af565b600054610100900460ff166142bb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b6142c3614997565b6142cb614a02565b565b600054610100900460ff166143385760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b6142cb614acf565b600054610100900460ff166143ab5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b6143b66103e861284f565b6143c06002611fc5565b6143ca6004612e6b565b6143d561a8c0611e5a565b6143e061a8c0612fc7565b6143ec620d2f00612be1565b61443c6144217f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614b3a565b61442c90600a615686565b61443790606461521c565b612ad4565b610b067f00000000000000000000000000000000000000000000000000000000000000006144927f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614b3a565b61449d90600a615686565b61274990600a61521c565b8015806144b957506144b984613b65565b6121fb576121fb6001600160a01b038516848484614bb4565b806000036144df57505050565b6144e883613b65565b15612ce6576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121fb573d6000803e3d6000fd5b6060610a8f6001600160a01b03831660145b60606000614544836002615577565b61454f9060026151f6565b67ffffffffffffffff8111156145675761456761519b565b6040519080825280601f01601f191660200182016040528015614591576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106145c8576145c86151b1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061462b5761462b6151b1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000614667846002615577565b6146729060016151f6565b90505b600181111561470f577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106146b3576146b36151b1565b1a60f81b8282815181106146c9576146c96151b1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936147088161569e565b9050614675565b50831561150e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bb6565b60008181526001830160205260408120546147a557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a8f565b506000610a8f565b600081815260018301602052604081205480156148965760006147d1600183615209565b85549091506000906147e590600190615209565b905081811461484a576000866000018281548110614805576148056151b1565b9060005260206000200154905080876000018481548110614828576148286151b1565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061485b5761485b6156b5565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a8f565b6000915050610a8f565b60006000198284099392505050565b6000614904826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614c059092919063ffffffff16565b905080516000148061492557508080602001905181019061492591906156cb565b610b375760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610bb6565b600054610100900460ff166142cb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b600054610100900460ff16614a6d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b60c9805461ffff19166004179055614aa57f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614c14565b6142cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614c5f565b600054610100900460ff166128055760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bb6565b6000614b4582613b65565b15614b5257506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614b90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8f91906156e8565b6040516001600160a01b03808516602483015283166044820152606481018290526121fb9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016141ec565b6060612d498484600085614c69565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610ad88282611f81565b606082471015614ce15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610bb6565b600080866001600160a01b03168587604051614cfd919061570b565b60006040518083038185875af1925050503d8060008114614d3a576040519150601f19603f3d011682016040523d82523d6000602084013e614d3f565b606091505b5091509150614d5087838387614d5b565b979650505050505050565b60608315614dca578251600003614dc3576001600160a01b0385163b614dc35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bb6565b5081612d49565b612d498383815115614ddf5781518083602001fd5b8060405162461bcd60e51b8152600401610bb69190615653565b600060208284031215614e0b57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461150e57600080fd5b600060208284031215614e4d57600080fd5b813563ffffffff8116811461150e57600080fd5b6001600160a01b0381168114610b0f57600080fd5b600060208284031215614e8857600080fd5b813561150e81614e61565b600060208284031215614ea557600080fd5b5035919050565b60008060408385031215614ebf57600080fd5b823591506020830135614ed181614e61565b809150509250929050565b60008083601f840112614eee57600080fd5b50813567ffffffffffffffff811115614f0657600080fd5b6020830191508360208260051b8501011115613bc057600080fd5b60008060208385031215614f3457600080fd5b823567ffffffffffffffff811115614f4b57600080fd5b614f5785828601614edc565b90969095509350505050565b80356001600160801b038116811461243757600080fd5b60008060408385031215614f8d57600080fd5b8235614f9881614e61565b9150614fa660208401614f63565b90509250929050565b60408101610a8f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614fe657600080fd5b50508035926020909101359150565b60006020828403121561500757600080fd5b61150e82614f63565b60008060008060006060868803121561502857600080fd5b853567ffffffffffffffff8082111561504057600080fd5b61504c89838a01614edc565b90975095506020880135915061506182614e61565b9093506040870135908082111561507757600080fd5b5061508488828901614edc565b969995985093965092949392505050565b8015158114610b0f57600080fd5b600080604083850312156150b657600080fd5b82356150c181614e61565b91506020830135614ed181615095565b6000806000604084860312156150e657600080fd5b83356150f181615095565b9250602084013567ffffffffffffffff8082111561510e57600080fd5b818601915086601f83011261512257600080fd5b81358181111561513157600080fd5b87602082850101111561514357600080fd5b6020830194508093505050509250925092565b60008060006060848603121561516b57600080fd5b833561517681614e61565b925061518460208501614f63565b915061519260408501614f63565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156151d957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a8f57610a8f6151e0565b81810381811115610a8f57610a8f6151e0565b6001600160801b0381811683821602808216919082811461523f5761523f6151e0565b505092915050565b63ffffffff8281168282160390808211156113a5576113a56151e0565b60008184825b8581101561529b57813561527d81614e61565b6001600160a01b03168352602092830192919091019060010161526a565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156152df57600080fd5b8260051b80856040850137919091016040019392505050565b61ffff8181168382160190808211156113a5576113a56151e0565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061534057615340615313565b92169190910492915050565b60006001600160801b038084168061534057615340615313565b600063ffffffff8084168061537d5761537d615313565b92169190910692915050565b600181815b808511156153c45781600019048211156153aa576153aa6151e0565b808516156153b757918102915b93841c939080029061538e565b509250929050565b600181815b808511156153c457816001600160801b03048211156153f2576153f26151e0565b808516156153ff57918102915b93841c93908002906153d1565b60008261541b57506001610a8f565b8161542857506000610a8f565b816001811461543e576002811461544857615464565b6001915050610a8f565b60ff841115615459576154596151e0565b50506001821b610a8f565b5060208310610133831016604e8410600b8410161715615487575081810a610a8f565b6154918383615389565b80600019048211156154a5576154a56151e0565b029392505050565b6000826154bc57506001610a8f565b816154c957506000610a8f565b816001811461543e576002810361550e5760ff8411156154eb576154eb6151e0565b6001841b91506001600160801b03821115615508576155086151e0565b50610a8f565b5060208310610133831016604e8410600b8410161715615548575081810a6001600160801b03811115615543576155436151e0565b610a8f565b61555283836153cc565b806001600160801b03048211156154a5576154a56151e0565b600061150e838361540c565b8082028115828204841417610a8f57610a8f6151e0565b6001600160801b038281168282160390808211156113a5576113a56151e0565b60005b838110156155c95781810151838201526020016155b1565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161560a8160178501602088016155ae565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516156478160288401602088016155ae565b01602801949350505050565b60208152600082518060208401526156728160408501602087016155ae565b601f01601f19169190910160400192915050565b600061150e60ff84166001600160801b0384166154ad565b6000816156ad576156ad6151e0565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6000602082840312156156dd57600080fd5b815161150e81615095565b6000602082840312156156fa57600080fd5b815160ff8116811461150e57600080fd5b6000825161571d8184602087016155ae565b919091019291505056fea164736f6c6343000813000a", "devdoc": { + "details": "collects fees and allows users to trade tokens in a dutch auction style configurable parameters include the target token, final target token and the halflife auctions are initiated by calling the execute function all auctions start with an initial price of 2^128 - 1 half-life parameter sets the price decay rate - - this is the time in seconds it takes for the price to halve - this parameter can be configured so that tokens reach the market rate faster or slower target token is the token to which all other tokens are traded to (can be native token for example) final target token is an additional token to which the target token is traded to (optional) transferAddress is the address to which all target / final target tokens are sent to", "events": { "Initialized(uint8)": { "details": "Triggered when the contract has been initialized or reinitialized." @@ -1447,7 +1360,7 @@ "kind": "dev", "methods": { "constructor": { - "details": "used to set immutable state variables and initialize the implementation" + "details": "used to set immutable state variables" }, "getRoleAdmin(bytes32)": { "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." @@ -1464,7 +1377,7 @@ "hasRole(bytes32,address)": { "details": "Returns `true` if `account` has been granted `role`." }, - "initialize()": { + "initialize(address)": { "details": "fully initializes the contract and its parents" }, "postUpgrade(bool,bytes)": { @@ -1528,6 +1441,9 @@ }, "TradingReset(address,(uint128,uint128))": { "notice": "triggered when trading is reset for a token (dutch auction has been restarted)" + }, + "TransferAddressUpdated(address,address)": { + "notice": "triggered when the transfer address is updated" } }, "kind": "user", @@ -1598,6 +1514,9 @@ "setTargetTokenPriceDecayHalfLifeOnReset(uint32)": { "notice": "sets the price decay half-life for the target token on reset Requirements: - The caller must be the admin of the contract." }, + "setTransferAddress(address)": { + "notice": "sets the transfer address requirements: - the caller must be the current admin of the contract" + }, "targetToken()": { "notice": "returns the target token" }, @@ -1621,6 +1540,9 @@ }, "tradingEnabled(address)": { "notice": "returns true if trading is enabled for token (dutch auction started)" + }, + "transferAddress()": { + "notice": "returns the transfer address" } }, "notice": "CarbonVortex contract", @@ -1725,7 +1647,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 21562, + "astId": 21557, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_totalCollected", "offset": 0, @@ -1733,7 +1655,7 @@ "type": "t_uint256" }, { - "astId": 21564, + "astId": 21559, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_rewardsPPM", "offset": 0, @@ -1741,7 +1663,7 @@ "type": "t_uint32" }, { - "astId": 21566, + "astId": 21561, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_priceResetMultiplier", "offset": 4, @@ -1749,7 +1671,7 @@ "type": "t_uint32" }, { - "astId": 21568, + "astId": 21563, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_minTokenSaleAmountMultiplier", "offset": 8, @@ -1757,7 +1679,7 @@ "type": "t_uint32" }, { - "astId": 21570, + "astId": 21565, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_targetTokenPriceDecayHalfLife", "offset": 12, @@ -1765,7 +1687,7 @@ "type": "t_uint32" }, { - "astId": 21572, + "astId": 21567, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_targetTokenPriceDecayHalfLifeOnReset", "offset": 16, @@ -1773,7 +1695,7 @@ "type": "t_uint32" }, { - "astId": 21574, + "astId": 21569, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_priceDecayHalfLife", "offset": 20, @@ -1781,7 +1703,7 @@ "type": "t_uint32" }, { - "astId": 21579, + "astId": 21574, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_disabledPairs", "offset": 0, @@ -1789,7 +1711,7 @@ "type": "t_mapping(t_userDefinedValueType(Token)19713,t_bool)" }, { - "astId": 21584, + "astId": 21579, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_tradingStartTimes", "offset": 0, @@ -1797,15 +1719,15 @@ "type": "t_mapping(t_userDefinedValueType(Token)19713,t_uint32)" }, { - "astId": 21590, + "astId": 21585, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_initialPrice", "offset": 0, "slot": "305", - "type": "t_mapping(t_userDefinedValueType(Token)19713,t_struct(Price)23903_storage)" + "type": "t_mapping(t_userDefinedValueType(Token)19713,t_struct(Price)23902_storage)" }, { - "astId": 21595, + "astId": 21590, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_minTokenSaleAmounts", "offset": 0, @@ -1813,20 +1735,28 @@ "type": "t_mapping(t_userDefinedValueType(Token)19713,t_uint128)" }, { - "astId": 21598, + "astId": 21593, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "_targetTokenSaleAmount", "offset": 0, "slot": "307", - "type": "t_struct(SaleAmount)23908_storage" + "type": "t_struct(SaleAmount)23907_storage" }, { - "astId": 21604, + "astId": 21595, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "__gap", + "label": "_transferAddress", "offset": 0, "slot": "308", - "type": "t_array(t_uint256)43_storage" + "type": "t_address_payable" + }, + { + "astId": 21601, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "309", + "type": "t_array(t_uint256)42_storage" } ], "types": { @@ -1835,17 +1765,22 @@ "label": "address", "numberOfBytes": "20" }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, "t_array(t_bytes32)dyn_storage": { "base": "t_bytes32", "encoding": "dynamic_array", "label": "bytes32[]", "numberOfBytes": "32" }, - "t_array(t_uint256)43_storage": { + "t_array(t_uint256)42_storage": { "base": "t_uint256", "encoding": "inplace", - "label": "uint256[43]", - "numberOfBytes": "1376" + "label": "uint256[42]", + "numberOfBytes": "1344" }, "t_array(t_uint256)49_storage": { "base": "t_uint256", @@ -1904,12 +1839,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_userDefinedValueType(Token)19713,t_struct(Price)23903_storage)": { + "t_mapping(t_userDefinedValueType(Token)19713,t_struct(Price)23902_storage)": { "encoding": "mapping", "key": "t_userDefinedValueType(Token)19713", "label": "mapping(Token => struct ICarbonVortex.Price)", "numberOfBytes": "32", - "value": "t_struct(Price)23903_storage" + "value": "t_struct(Price)23902_storage" }, "t_mapping(t_userDefinedValueType(Token)19713,t_uint128)": { "encoding": "mapping", @@ -1940,12 +1875,12 @@ ], "numberOfBytes": "64" }, - "t_struct(Price)23903_storage": { + "t_struct(Price)23902_storage": { "encoding": "inplace", "label": "struct ICarbonVortex.Price", "members": [ { - "astId": 23900, + "astId": 23899, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "sourceAmount", "offset": 0, @@ -1953,7 +1888,7 @@ "type": "t_uint128" }, { - "astId": 23902, + "astId": 23901, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "targetAmount", "offset": 16, @@ -1986,12 +1921,12 @@ ], "numberOfBytes": "64" }, - "t_struct(SaleAmount)23908_storage": { + "t_struct(SaleAmount)23907_storage": { "encoding": "inplace", "label": "struct ICarbonVortex.SaleAmount", "members": [ { - "astId": 23905, + "astId": 23904, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "initial", "offset": 0, @@ -1999,7 +1934,7 @@ "type": "t_uint128" }, { - "astId": 23907, + "astId": 23906, "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", "label": "current", "offset": 16, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8a1e5f7..9612e9b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,7 +15,7 @@ importers: dependencies: hardhat: specifier: 2.22.8 - version: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) devDependencies: '@anders-t/ethers-ledger': specifier: ^1.0.4 @@ -31,16 +31,16 @@ importers: version: 5.1.0 '@nomicfoundation/hardhat-verify': specifier: ^2.0.8 - version: 2.0.10(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: 2.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@nomiclabs/hardhat-ethers': specifier: npm:hardhat-deploy-ethers@0.3.0-beta.13 - version: hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@nomiclabs/hardhat-solhint': specifier: ^3.0.1 - version: 3.1.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(typescript@5.6.2) + version: 3.1.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3) '@nomiclabs/hardhat-waffle': specifier: 2.0.4 - version: 2.0.4(ethereum-waffle@3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.2)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: 2.0.4(ethereum-waffle@3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@openzeppelin/contracts': specifier: 4.9.2 version: 4.9.2 @@ -52,49 +52,49 @@ importers: version: 7.114.0 '@sentry/node': specifier: ^7.56.0 - version: 7.119.0 + version: 7.119.2 '@sentry/types': specifier: ^7.56.0 - version: 7.119.0 + version: 7.119.2 '@sentry/utils': specifier: ^7.56.0 - version: 7.119.0 + version: 7.119.2 '@tenderly/hardhat-tenderly': specifier: 1.8.0 - version: 1.8.0(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 1.8.0(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) '@trivago/prettier-plugin-sort-imports': specifier: ^4.0.0 version: 4.3.0(prettier@2.8.8) '@typechain/ethers-v5': specifier: ^11.0.0 - version: 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.2))(typescript@5.6.2) + version: 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3) '@typechain/hardhat': specifier: ^6.1.5 - version: 6.1.6(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.2))(typescript@5.6.2))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.2)) + version: 6.1.6(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3)) '@types/adm-zip': specifier: ^0.5.0 version: 0.5.5 '@types/chai': specifier: ^4.3.4 - version: 4.3.19 + version: 4.3.20 '@types/humanize-duration': specifier: ^3.27.1 version: 3.27.4 '@types/lodash': specifier: ^4.14.191 - version: 4.17.7 + version: 4.17.10 '@types/mocha': specifier: ^10.0.1 - version: 10.0.8 + version: 10.0.9 '@types/node': specifier: ^20.3.1 - version: 20.16.5 + version: 20.16.11 '@typescript-eslint/eslint-plugin': specifier: ^7.7.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2) + version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/parser': specifier: ^7.7.0 - version: 7.18.0(eslint@8.57.1)(typescript@5.6.2) + version: 7.18.0(eslint@8.57.1)(typescript@5.6.3) adm-zip: specifier: ^0.5.10 version: 0.5.16 @@ -124,10 +124,10 @@ importers: version: 8.10.0(eslint@8.57.1) eslint-config-standard: specifier: ^17.0.0 - version: 17.1.0(eslint-plugin-import@2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1))(eslint-plugin-n@16.6.2(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1) + version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1))(eslint-plugin-n@16.6.2(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1) eslint-plugin-import: specifier: ^2.27.5 - version: 2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1) + version: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) eslint-plugin-mocha: specifier: ^10.1.0 version: 10.5.0(eslint@8.57.1) @@ -139,7 +139,7 @@ importers: version: 6.6.0(eslint@8.57.1) ethereum-waffle: specifier: ^3.4.4 - version: 3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10) ethereumjs-util: specifier: ^7.1.5 version: 7.1.5 @@ -151,22 +151,22 @@ importers: version: 10.4.5 hardhat-contract-sizer: specifier: ^2.10.0 - version: 2.10.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: 2.10.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) hardhat-dependency-compiler: specifier: ^1.1.3 - version: 1.2.1(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: 1.2.1(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) hardhat-deploy: specifier: 0.11.34 version: 0.11.34(bufferutil@4.0.8)(utf-8-validate@5.0.10) hardhat-deploy-tenderly: specifier: ^0.2.0 - version: 0.2.0(hardhat-deploy@0.11.34(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: 0.2.0(hardhat-deploy@0.11.34(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) hardhat-storage-layout: specifier: ^0.1.7 - version: 0.1.7(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: 0.1.7(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) hardhat-watcher: specifier: ^2.5.0 - version: 2.5.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: 2.5.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) humanize-duration: specifier: ^3.28.0 version: 3.32.1 @@ -199,35 +199,35 @@ importers: version: 0.8.19 solhint: specifier: ^3.3.8 - version: 3.6.2(typescript@5.6.2) + version: 3.6.2(typescript@5.6.3) solidity-coverage: specifier: ^0.8.2 - version: 0.8.13(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: 0.8.13(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) + version: 10.9.2(@types/node@20.16.11)(typescript@5.6.3) typechain: specifier: ^8.1.1 - version: 8.3.2(typescript@5.6.2) + version: 8.3.2(typescript@5.6.3) typescript: specifier: ^5.1.3 - version: 5.6.2 + version: 5.6.3 packages: '@anders-t/ethers-ledger@1.0.4': resolution: {integrity: sha512-EVuIE5qe1rSbO4A/uHSHENtqA+OTA73aWNzWxiqo/kpUlXIpb6pWps31Pf4Zeh3XL5uW7iXWmkKjDYfJgQXAbw==} - '@babel/code-frame@7.24.7': - resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + '@babel/code-frame@7.25.7': + resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} engines: {node: '>=6.9.0'} '@babel/generator@7.17.7': resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.6': - resolution: {integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==} + '@babel/generator@7.25.7': + resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} engines: {node: '>=6.9.0'} '@babel/helper-environment-visitor@7.24.7': @@ -246,25 +246,25 @@ packages: resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.8': - resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} + '@babel/helper-string-parser@7.25.7': + resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.7': - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + '@babel/helper-validator-identifier@7.25.7': + resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.24.7': - resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + '@babel/highlight@7.25.7': + resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.25.6': - resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} + '@babel/parser@7.25.8': + resolution: {integrity: sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/template@7.25.0': - resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} + '@babel/template@7.25.7': + resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} engines: {node: '>=6.9.0'} '@babel/traverse@7.23.2': @@ -275,8 +275,8 @@ packages: resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.6': - resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} + '@babel/types@7.25.8': + resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==} engines: {node: '>=6.9.0'} '@colors/colors@1.5.0': @@ -477,35 +477,35 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@ledgerhq/cryptoassets@13.4.0': - resolution: {integrity: sha512-MLXpu0qjwvNhU5K13b+XJYjMIVFTZJeMQRt7L19o+9RUGOxUuhXSnZwZ35XeAbtKJcPR8IoAPDduipWk1KnLSg==} + '@ledgerhq/cryptoassets-evm-signatures@13.5.0': + resolution: {integrity: sha512-lEz+orFtMVGysZ303n7C/aDrkYpKSHpuifJTt4/Bj4S9OwUv8ExnfazYL/fYMXMUmb1vwzfQ6nKBW01hiY5pBQ==} - '@ledgerhq/devices@8.4.3': - resolution: {integrity: sha512-+ih+M27E6cm6DHrmw3GbS3mEaznCyFc0e62VdQux40XK2psgYhL2yBPftM4KCrBYm1UbHqXzqLN+Jb7rNIzsHg==} + '@ledgerhq/devices@8.4.4': + resolution: {integrity: sha512-sz/ryhe/R687RHtevIE9RlKaV8kkKykUV4k29e7GAVwzHX1gqG+O75cu1NCJUHLbp3eABV5FdvZejqRUlLis9A==} - '@ledgerhq/domain-service@1.2.4': - resolution: {integrity: sha512-Ycm4uTIHiZfkp3sWEBXbPjpQHTIQnlNpQHIJi70G3c8eY4CwlLxqBrBnY9ac9vmu16CuXLdoUU/omBq9yNezWQ==} + '@ledgerhq/domain-service@1.2.6': + resolution: {integrity: sha512-tT1PFm71w2VFHJfCEoQ8znA8f1WRWGJJGEt8xql2YP0JFJygDe7PPbHTHHywLlZqo8GBqAGZzjTOmdyDcPPP1w==} - '@ledgerhq/errors@6.19.0': - resolution: {integrity: sha512-c3Jid7euMSnpHFp8H7iPtsmKDjwbTjlG46YKdw+RpCclsqtBx1uQDlYmcbP1Yv9201kVlUFUhhP4H623k8xzlQ==} + '@ledgerhq/errors@6.19.1': + resolution: {integrity: sha512-75yK7Nnit/Gp7gdrJAz0ipp31CCgncRp+evWt6QawQEtQKYEDfGo10QywgrrBBixeRxwnMy1DP6g2oCWRf1bjw==} - '@ledgerhq/evm-tools@1.2.1': - resolution: {integrity: sha512-4rQveePJrBmP2a+kaqxuhj0ohm9iL71dR0dompqLY/ijktwzw6uVBn2Q81dkrq8QeTPjXv+bDUXmofPEnzeEPg==} + '@ledgerhq/evm-tools@1.2.3': + resolution: {integrity: sha512-uQGygvpR1QAJ8hadpx/86GHrhyAz7xJN22GRUDQeYF8b1/i9TSzGXs1crjfFU2aF1+vUhIxv+s3wvbDR5v3/QA==} - '@ledgerhq/hw-app-eth@6.38.1': - resolution: {integrity: sha512-r7JiVqsxuc8q1cbz1YVLPw6AoBUoj23N9GMXje4JFvc/4ZE6ycxaGkIFsvz/HmQMn0ydNFiqQO071x3LUqsLOg==} + '@ledgerhq/hw-app-eth@6.39.0': + resolution: {integrity: sha512-T/lLwrY1cpXmAyjfSlSUt9lVdCmO1h2pigONtiTWysiwpCu2s4L1Bfk0qZoc5K68ohTahNVxviRJl1xqFg+fXA==} - '@ledgerhq/hw-transport-mocker@6.29.3': - resolution: {integrity: sha512-WU63pZ96HiyKce1eob/934o4TV9Q2W4uh0YUATl8iWNcPNG0+1b2owGOTfAgoW8/IAg6xzicv4XVRebAbnim4A==} + '@ledgerhq/hw-transport-mocker@6.29.4': + resolution: {integrity: sha512-CLDIpQ/eqU8qrCYGY9MyHa+oMgqs6PuNkWtqbcaS4AzNx8L/9bv7y8CZwCjxX6oB/2ZEq42RlL6oZ6Ou3oHnoQ==} - '@ledgerhq/hw-transport-node-hid-noevents@6.30.4': - resolution: {integrity: sha512-01cPvdIe8xwfrcOoR7vr2kN/4HHYVvAydU7hAHvLMC76irbhkbuTZiWzhr54FmEOdqz+fZnC+MUDIQHLQsjXQw==} + '@ledgerhq/hw-transport-node-hid-noevents@6.30.5': + resolution: {integrity: sha512-nOPbhFU87LgLERVAQ+HhxV8E8c+7d8ptllkgiJUc4QwL2z9zkIOAEtgdvCaZ066Oi9XGnln/GF1oAgByYnYDPw==} - '@ledgerhq/hw-transport-node-hid@6.29.4': - resolution: {integrity: sha512-Spwb7L9YnKrhvRVj5hJ1DzmvQJHVeNSmN+yTVSFQ4QRcjqDKC+N+zVO/7HDhLl5TWo1KmgNx4/BhAZ648gpp5w==} + '@ledgerhq/hw-transport-node-hid@6.29.5': + resolution: {integrity: sha512-2bAp4K50V1kdCufU9JdQPcw4aLyvA+yQRJU/X39B+PC+rnis40gEbqNh0henhzv876sXdbNk6G/MkDWXpwDIow==} - '@ledgerhq/hw-transport@6.31.3': - resolution: {integrity: sha512-rFplkHWF5NXtlYwAusqLlMu298NHtRD+2q/jrTYc//uu/xJO9LkDIgKid6IVF2+e1Wj7yX6YQVrU6L0Yu1ntEw==} + '@ledgerhq/hw-transport@6.31.4': + resolution: {integrity: sha512-6c1ir/cXWJm5dCWdq55NPgCJ3UuKuuxRvf//Xs36Bq9BwkV2YaRQhZITAkads83l07NAdR16hkTWqqpwFMaI6A==} '@ledgerhq/live-env@2.3.0': resolution: {integrity: sha512-VWZso7/LdxxlaQqJ1tI44yrAadiJ78VUyQomlg7YY1eNI12+3xzWK8Rfs/aZEIQYp5q6ZBgbbDe7hmTtcAd4KQ==} @@ -513,8 +513,8 @@ packages: '@ledgerhq/logs@6.12.0': resolution: {integrity: sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==} - '@ledgerhq/types-live@6.51.0': - resolution: {integrity: sha512-iaLIGb0UwXLVIowl//fOlzlN2HTIa7mu8FE1oGZM64mh6kqf7QEguLPhlr3ZaNMmfwCr86oyr6pzNjlcYUHWgg==} + '@ledgerhq/types-live@6.52.0': + resolution: {integrity: sha512-3ZMUGGkeb0kLWr16SCS8cZRudVLafoYWBDyeBn0cqVtX8T5iUNmC+ICICsJZrn5KJcM0JsOs6DBuuFmSVJ1Q5Q==} '@ljharb/resumer@0.0.1': resolution: {integrity: sha512-skQiAOrCfO7vRTq53cxznMpks7wS1va95UCidALlOVWqvBAzwPVErwizDwoMqNVMEn1mDq0utxZd02eIrvF1lw==} @@ -619,8 +619,8 @@ packages: c-kzg: optional: true - '@nomicfoundation/hardhat-verify@2.0.10': - resolution: {integrity: sha512-3zoTZGQhpeOm6piJDdsGb6euzZAd7N5Tk0zPQvGnfKQ0+AoxKz/7i4if12goi8IDTuUGElAUuZyQB8PMQoXA5g==} + '@nomicfoundation/hardhat-verify@2.0.11': + resolution: {integrity: sha512-lGIo4dNjVQFdsiEgZp3KP6ntLiF7xJEJsbNHfSyIiFCyI0Yv0518ElsFtMC5uCuHEChiBBMrib9jWQvHHT+X3Q==} peerDependencies: hardhat: ^2.0.4 @@ -694,8 +694,8 @@ packages: '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} - '@scure/base@1.1.8': - resolution: {integrity: sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==} + '@scure/base@1.1.9': + resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} '@scure/bip32@1.1.5': resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} @@ -709,8 +709,8 @@ packages: '@scure/bip39@1.3.0': resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==} - '@sentry-internal/tracing@7.119.0': - resolution: {integrity: sha512-oKdFJnn+56f0DHUADlL8o9l8jTib3VDLbWQBVkjD9EprxfaCwt2m8L5ACRBdQ8hmpxCEo4I8/6traZ7qAdBUqA==} + '@sentry-internal/tracing@7.119.2': + resolution: {integrity: sha512-V2W+STWrafyGJhQv3ulMFXYDwWHiU6wHQAQBShsHVACiFaDrJ2kPRet38FKv4dMLlLlP2xN+ss2e5zv3tYlTiQ==} engines: {node: '>=8'} '@sentry/core@5.30.0': @@ -721,8 +721,8 @@ packages: resolution: {integrity: sha512-YnanVlmulkjgZiVZ9BfY9k6I082n+C+LbZo52MTvx3FY6RE5iyiPMpaOh67oXEZRWcYQEGm+bKruRxLVP6RlbA==} engines: {node: '>=8'} - '@sentry/core@7.119.0': - resolution: {integrity: sha512-CS2kUv9rAJJEjiRat6wle3JATHypB0SyD7pt4cpX5y0dN5dZ1JrF57oLHRMnga9fxRivydHz7tMTuBhSSwhzjw==} + '@sentry/core@7.119.2': + resolution: {integrity: sha512-hQr3d2yWq/2lMvoyBPOwXw1IHqTrCjOsU1vYKhAa6w9vGbJZFGhKGGE2KEi/92c3gqGn+gW/PC7cV6waCTDuVA==} engines: {node: '>=8'} '@sentry/hub@5.30.0': @@ -733,8 +733,8 @@ packages: resolution: {integrity: sha512-1Q3S5O9fMZ4vB9GJJQB8gw//VZRt8LzlHvMhqMS+K7mm215Rj2qM2wY0js7QSTupHBlZ0+M9j8o7C8XUXAeXbQ==} engines: {node: '>=8'} - '@sentry/integrations@7.119.0': - resolution: {integrity: sha512-OHShvtsRW0A+ZL/ZbMnMqDEtJddPasndjq+1aQXw40mN+zeP7At/V1yPZyFaURy86iX7Ucxw5BtmzuNy7hLyTA==} + '@sentry/integrations@7.119.2': + resolution: {integrity: sha512-dCuXKvbUE3gXVVa696SYMjlhSP6CxpMH/gl4Jk26naEB8Xjsn98z/hqEoXLg6Nab73rjR9c/9AdKqBbwVMHyrQ==} engines: {node: '>=8'} '@sentry/minimal@5.30.0': @@ -745,8 +745,8 @@ packages: resolution: {integrity: sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==} engines: {node: '>=6'} - '@sentry/node@7.119.0': - resolution: {integrity: sha512-9PFzN8xS6U0oZCflpVxS2SSIsHkCaj7qYBlsvHj4CTGWfao9ImwrU6+smy4qoG6oxwPfoVb5pOOMb4WpWOvXcQ==} + '@sentry/node@7.119.2': + resolution: {integrity: sha512-TPNnqxh+Myooe4jTyRiXrzrM2SH08R4+nrmBls4T7lKp2E5R/3mDSe/YTn5rRcUt1k1hPx1NgO/taG0DoS5cXA==} engines: {node: '>=8'} '@sentry/tracing@5.30.0': @@ -761,8 +761,8 @@ packages: resolution: {integrity: sha512-tsqkkyL3eJtptmPtT0m9W/bPLkU7ILY7nvwpi1hahA5jrM7ppoU0IMaQWAgTD+U3rzFH40IdXNBFb8Gnqcva4w==} engines: {node: '>=8'} - '@sentry/types@7.119.0': - resolution: {integrity: sha512-27qQbutDBPKGbuJHROxhIWc1i0HJaGLA90tjMu11wt0E4UNxXRX+UQl4Twu68v4EV3CPvQcEpQfgsViYcXmq+w==} + '@sentry/types@7.119.2': + resolution: {integrity: sha512-ydq1tWsdG7QW+yFaTp0gFaowMLNVikIqM70wxWNK+u98QzKnVY/3XTixxNLsUtnAB4Y+isAzFhrc6Vb5GFdFeg==} engines: {node: '>=8'} '@sentry/utils@5.30.0': @@ -773,8 +773,8 @@ packages: resolution: {integrity: sha512-319N90McVpupQ6vws4+tfCy/03AdtsU0MurIE4+W5cubHME08HtiEWlfacvAxX+yuKFhvdsO4K4BB/dj54ideg==} engines: {node: '>=8'} - '@sentry/utils@7.119.0': - resolution: {integrity: sha512-ZwyXexWn2ZIe2bBoYnXJVPc2esCSbKpdc6+0WJa8eutXfHq3FRKg4ohkfCBpfxljQGEfP1+kfin945lA21Ka+A==} + '@sentry/utils@7.119.2': + resolution: {integrity: sha512-TLdUCvcNgzKP0r9YD7tgCL1PEUp42TObISridsPJ5rhpVGQJvpr+Six0zIkfDUxerLYWZoK8QMm9KgFlPLNQzA==} engines: {node: '>=8'} '@sindresorhus/is@0.14.0': @@ -862,8 +862,8 @@ packages: '@types/cacheable-request@6.0.3': resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} - '@types/chai@4.3.19': - resolution: {integrity: sha512-2hHHvQBVE2FiSK4eN0Br6snX9MtolHaTo/batnLjlGRhoQzlCL61iVpxoqO7SfFyOw+P/pwv+0zNHzKoGWz9Cw==} + '@types/chai@4.3.20': + resolution: {integrity: sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==} '@types/glob@7.2.0': resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} @@ -880,8 +880,8 @@ packages: '@types/keyv@3.1.4': resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} - '@types/lodash@4.17.7': - resolution: {integrity: sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==} + '@types/lodash@4.17.10': + resolution: {integrity: sha512-YpS0zzoduEhuOWjAotS6A5AVCva7X4lVlYLF0FYHAY9sdraBfnatttHItlWeZdGhuEkf+OzMNg2ZYAx8t+52uQ==} '@types/lru-cache@5.1.1': resolution: {integrity: sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==} @@ -892,8 +892,8 @@ packages: '@types/mkdirp@0.5.2': resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==} - '@types/mocha@10.0.8': - resolution: {integrity: sha512-HfMcUmy9hTMJh66VNcmeC9iVErIZJli2bszuXc6julh5YGuRb/W5OnkHjwLNYdFlMis0sY3If5SEAp+PktdJjw==} + '@types/mocha@10.0.9': + resolution: {integrity: sha512-sicdRoWtYevwxjOHNMPTl3vSfJM6oyW8o1wXeI7uww6b6xHg8eBznQDNSGBCDJmsE8UMxP05JgZRtsKbTqt//Q==} '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} @@ -901,8 +901,8 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@20.16.5': - resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} + '@types/node@20.16.11': + resolution: {integrity: sha512-y+cTCACu92FyA5fgQSAI8A1H429g7aSK2HsO7K4XYUWc4dY5IUz55JSDIYT6/VsOLfGy8vmvQYC2hfb0iF16Uw==} '@types/parse-author@2.0.3': resolution: {integrity: sha512-pgRW2K/GVQoogylrGJXDl7PBLW9A6T4OOc9Hy9MLT5f7vgufK2GQ8FcfAbjFHR5HjcN9ByzuCczAORk49REqoA==} @@ -1282,8 +1282,8 @@ packages: axios@0.27.2: resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} - axios@1.7.3: - resolution: {integrity: sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==} + axios@1.7.7: + resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} babel-code-frame@6.26.0: resolution: {integrity: sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==} @@ -1539,8 +1539,9 @@ packages: browserify-des@1.0.2: resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} - browserify-rsa@4.1.0: - resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} + browserify-rsa@4.1.1: + resolution: {integrity: sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==} + engines: {node: '>= 0.10'} browserify-sign@4.2.3: resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==} @@ -1627,8 +1628,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001660: - resolution: {integrity: sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==} + caniuse-lite@1.0.30001668: + resolution: {integrity: sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -1813,8 +1814,8 @@ packages: resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} engines: {node: '>= 0.6'} - cookie@0.6.0: - resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + cookie@0.7.1: + resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} cookiejar@2.1.4: @@ -2098,8 +2099,8 @@ packages: eip55@2.1.1: resolution: {integrity: sha512-WcagVAmNu2Ww2cDUfzuWVntYwFxbvZ5MvIyLZpMjTTkjD6sCvkGOiS86jTppzu9/gWsc8isLHAeMBWK02OnZmA==} - electron-to-chromium@1.5.24: - resolution: {integrity: sha512-0x0wLCmpdKFCi9ulhvYZebgcPmHTkFVUfU2wzDykadkslKwT4oAmDTHEKLnlrDsMGZe4B+ksn8quZfZjYsBetA==} + electron-to-chromium@1.5.36: + resolution: {integrity: sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==} elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} @@ -2234,8 +2235,8 @@ packages: eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-module-utils@2.11.0: - resolution: {integrity: sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==} + eslint-module-utils@2.12.0: + resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -2261,12 +2262,12 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-import@2.30.0: - resolution: {integrity: sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==} + eslint-plugin-import@2.31.0: + resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 peerDependenciesMeta: '@typescript-eslint/parser': optional: true @@ -2310,6 +2311,7 @@ packages: eslint@8.57.1: resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true esniff@2.0.1: @@ -2511,8 +2513,8 @@ packages: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} - express@4.21.0: - resolution: {integrity: sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==} + express@4.21.1: + resolution: {integrity: sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==} engines: {node: '>= 0.10.0'} ext@1.7.0: @@ -2556,8 +2558,8 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@3.0.1: - resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} + fast-uri@3.0.2: + resolution: {integrity: sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==} fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} @@ -2654,8 +2656,8 @@ packages: resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} engines: {node: '>= 0.12'} - form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} forwarded@0.2.0: @@ -3374,6 +3376,11 @@ packages: engines: {node: '>=4'} hasBin: true + jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + json-buffer@3.0.0: resolution: {integrity: sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==} @@ -3843,8 +3850,8 @@ packages: nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - node-abi@3.67.0: - resolution: {integrity: sha512-bLn/fU/ALVBE9wj+p4Y21ZJWYFjUXLXPi/IewyLZkx3ApxKDNBWCKdReeKOtD8dWpOdDCeMyLh6ZewzcLsG2Nw==} + node-abi@3.68.0: + resolution: {integrity: sha512-7vbj10trelExNjFSBm5kTvZXXa7pZyKWx9RCKIyqe6I9Ev3IzGpQoqBP3a+cOdxY+pWj6VkP28n/2wWysBHD/A==} engines: {node: '>=10'} node-addon-api@2.0.2: @@ -4044,8 +4051,8 @@ packages: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} engines: {node: '>=4'} - package-json-from-dist@1.0.0: - resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} @@ -4389,8 +4396,8 @@ packages: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} engines: {node: '>=0.10.0'} - regexp.prototype.flags@1.5.2: - resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + regexp.prototype.flags@1.5.3: + resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} engines: {node: '>= 0.4'} regexpu-core@2.0.0: @@ -5126,8 +5133,8 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript@5.6.2: - resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} engines: {node: '>=14.17'} hasBin: true @@ -5340,7 +5347,6 @@ packages: web3-provider-engine@14.2.1: resolution: {integrity: sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw==} - deprecated: 'This package has been deprecated, see the README for details: https://github.com/MetaMask/web3-provider-engine' web3-providers-http@1.2.11: resolution: {integrity: sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA==} @@ -5560,17 +5566,17 @@ snapshots: '@anders-t/ethers-ledger@1.0.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@ledgerhq/hw-app-eth': 6.38.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@ledgerhq/hw-transport-node-hid': 6.29.4 + '@ledgerhq/hw-app-eth': 6.39.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@ledgerhq/hw-transport-node-hid': 6.29.5 ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - debug - utf-8-validate - '@babel/code-frame@7.24.7': + '@babel/code-frame@7.25.7': dependencies: - '@babel/highlight': 7.24.7 + '@babel/highlight': 7.25.7 picocolors: 1.1.0 '@babel/generator@7.17.7': @@ -5579,61 +5585,61 @@ snapshots: jsesc: 2.5.2 source-map: 0.5.7 - '@babel/generator@7.25.6': + '@babel/generator@7.25.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.8 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 + jsesc: 3.0.2 '@babel/helper-environment-visitor@7.24.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.8 '@babel/helper-function-name@7.24.7': dependencies: - '@babel/template': 7.25.0 - '@babel/types': 7.25.6 + '@babel/template': 7.25.7 + '@babel/types': 7.25.8 '@babel/helper-hoist-variables@7.24.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.8 '@babel/helper-split-export-declaration@7.24.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.8 - '@babel/helper-string-parser@7.24.8': {} + '@babel/helper-string-parser@7.25.7': {} - '@babel/helper-validator-identifier@7.24.7': {} + '@babel/helper-validator-identifier@7.25.7': {} - '@babel/highlight@7.24.7': + '@babel/highlight@7.25.7': dependencies: - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.25.7 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.1.0 - '@babel/parser@7.25.6': + '@babel/parser@7.25.8': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.8 - '@babel/template@7.25.0': + '@babel/template@7.25.7': dependencies: - '@babel/code-frame': 7.24.7 - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 + '@babel/code-frame': 7.25.7 + '@babel/parser': 7.25.8 + '@babel/types': 7.25.8 '@babel/traverse@7.23.2': dependencies: - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.6 + '@babel/code-frame': 7.25.7 + '@babel/generator': 7.25.7 '@babel/helper-environment-visitor': 7.24.7 '@babel/helper-function-name': 7.24.7 '@babel/helper-hoist-variables': 7.24.7 '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 + '@babel/parser': 7.25.8 + '@babel/types': 7.25.8 debug: 4.3.7(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: @@ -5641,13 +5647,13 @@ snapshots: '@babel/types@7.17.0': dependencies: - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.25.7 to-fast-properties: 2.0.0 - '@babel/types@7.25.6': + '@babel/types@7.25.8': dependencies: - '@babel/helper-string-parser': 7.24.8 - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-string-parser': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 to-fast-properties: 2.0.0 '@colors/colors@1.5.0': @@ -5700,11 +5706,11 @@ snapshots: - supports-color - utf-8-validate - '@ethereum-waffle/compiler@3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.2)(utf-8-validate@5.0.10)': + '@ethereum-waffle/compiler@3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)': dependencies: '@resolver-engine/imports': 0.3.3 '@resolver-engine/imports-fs': 0.3.3 - '@typechain/ethers-v5': 2.0.0(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@3.0.0(typescript@5.6.2)) + '@typechain/ethers-v5': 2.0.0(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@3.0.0(typescript@5.6.3)) '@types/mkdirp': 0.5.2 '@types/node-fetch': 2.6.11 ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -5712,7 +5718,7 @@ snapshots: node-fetch: 2.7.0(encoding@0.1.13) solc: 0.6.12 ts-generator: 0.1.1 - typechain: 3.0.0(typescript@5.6.2) + typechain: 3.0.0(typescript@5.6.3) transitivePeerDependencies: - bufferutil - encoding @@ -6071,40 +6077,39 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@ledgerhq/cryptoassets@13.4.0': + '@ledgerhq/cryptoassets-evm-signatures@13.5.0': dependencies: - axios: 1.7.3 - bs58check: 2.1.2 - invariant: 2.2.4 + '@ledgerhq/live-env': 2.3.0 + axios: 1.7.7 transitivePeerDependencies: - debug - '@ledgerhq/devices@8.4.3': + '@ledgerhq/devices@8.4.4': dependencies: - '@ledgerhq/errors': 6.19.0 + '@ledgerhq/errors': 6.19.1 '@ledgerhq/logs': 6.12.0 rxjs: 7.8.1 semver: 7.6.3 - '@ledgerhq/domain-service@1.2.4': + '@ledgerhq/domain-service@1.2.6': dependencies: - '@ledgerhq/errors': 6.19.0 + '@ledgerhq/errors': 6.19.1 '@ledgerhq/logs': 6.12.0 - '@ledgerhq/types-live': 6.51.0 - axios: 1.7.3 + '@ledgerhq/types-live': 6.52.0 + axios: 1.7.7 eip55: 2.1.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) transitivePeerDependencies: - debug - '@ledgerhq/errors@6.19.0': {} + '@ledgerhq/errors@6.19.1': {} - '@ledgerhq/evm-tools@1.2.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@ledgerhq/evm-tools@1.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@ledgerhq/cryptoassets': 13.4.0 + '@ledgerhq/cryptoassets-evm-signatures': 13.5.0 '@ledgerhq/live-env': 2.3.0 - axios: 1.7.3 + axios: 1.7.7 crypto-js: 4.2.0 ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -6112,19 +6117,19 @@ snapshots: - debug - utf-8-validate - '@ledgerhq/hw-app-eth@6.38.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@ledgerhq/hw-app-eth@6.39.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/rlp': 5.7.0 - '@ledgerhq/cryptoassets': 13.4.0 - '@ledgerhq/domain-service': 1.2.4 - '@ledgerhq/errors': 6.19.0 - '@ledgerhq/evm-tools': 1.2.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@ledgerhq/hw-transport': 6.31.3 - '@ledgerhq/hw-transport-mocker': 6.29.3 + '@ledgerhq/cryptoassets-evm-signatures': 13.5.0 + '@ledgerhq/domain-service': 1.2.6 + '@ledgerhq/errors': 6.19.1 + '@ledgerhq/evm-tools': 1.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@ledgerhq/hw-transport': 6.31.4 + '@ledgerhq/hw-transport-mocker': 6.29.4 '@ledgerhq/logs': 6.12.0 - '@ledgerhq/types-live': 6.51.0 - axios: 1.7.3 + '@ledgerhq/types-live': 6.52.0 + axios: 1.7.7 bignumber.js: 9.1.2 semver: 7.6.3 transitivePeerDependencies: @@ -6132,35 +6137,35 @@ snapshots: - debug - utf-8-validate - '@ledgerhq/hw-transport-mocker@6.29.3': + '@ledgerhq/hw-transport-mocker@6.29.4': dependencies: - '@ledgerhq/hw-transport': 6.31.3 + '@ledgerhq/hw-transport': 6.31.4 '@ledgerhq/logs': 6.12.0 rxjs: 7.8.1 - '@ledgerhq/hw-transport-node-hid-noevents@6.30.4': + '@ledgerhq/hw-transport-node-hid-noevents@6.30.5': dependencies: - '@ledgerhq/devices': 8.4.3 - '@ledgerhq/errors': 6.19.0 - '@ledgerhq/hw-transport': 6.31.3 + '@ledgerhq/devices': 8.4.4 + '@ledgerhq/errors': 6.19.1 + '@ledgerhq/hw-transport': 6.31.4 '@ledgerhq/logs': 6.12.0 node-hid: 2.1.2 - '@ledgerhq/hw-transport-node-hid@6.29.4': + '@ledgerhq/hw-transport-node-hid@6.29.5': dependencies: - '@ledgerhq/devices': 8.4.3 - '@ledgerhq/errors': 6.19.0 - '@ledgerhq/hw-transport': 6.31.3 - '@ledgerhq/hw-transport-node-hid-noevents': 6.30.4 + '@ledgerhq/devices': 8.4.4 + '@ledgerhq/errors': 6.19.1 + '@ledgerhq/hw-transport': 6.31.4 + '@ledgerhq/hw-transport-node-hid-noevents': 6.30.5 '@ledgerhq/logs': 6.12.0 lodash: 4.17.21 node-hid: 2.1.2 usb: 2.9.0 - '@ledgerhq/hw-transport@6.31.3': + '@ledgerhq/hw-transport@6.31.4': dependencies: - '@ledgerhq/devices': 8.4.3 - '@ledgerhq/errors': 6.19.0 + '@ledgerhq/devices': 8.4.4 + '@ledgerhq/errors': 6.19.1 '@ledgerhq/logs': 6.12.0 events: 3.3.0 @@ -6171,7 +6176,7 @@ snapshots: '@ledgerhq/logs@6.12.0': {} - '@ledgerhq/types-live@6.51.0': + '@ledgerhq/types-live@6.52.0': dependencies: bignumber.js: 9.1.2 rxjs: 7.8.1 @@ -6269,14 +6274,14 @@ snapshots: '@nomicfoundation/ethereumjs-rlp': 5.0.4 ethereum-cryptography: 0.1.3 - '@nomicfoundation/hardhat-verify@2.0.10(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': + '@nomicfoundation/hardhat-verify@2.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/address': 5.7.0 cbor: 8.1.0 chalk: 2.4.2 debug: 4.3.7(supports-color@8.1.1) - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) lodash.clonedeep: 4.5.0 semver: 6.3.1 table: 6.8.2 @@ -6315,21 +6320,21 @@ snapshots: '@nomicfoundation/solidity-analyzer-linux-x64-musl': 0.1.2 '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.2 - '@nomiclabs/hardhat-solhint@3.1.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(typescript@5.6.2)': + '@nomiclabs/hardhat-solhint@3.1.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)': dependencies: - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) - solhint: 3.6.2(typescript@5.6.2) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) + solhint: 3.6.2(typescript@5.6.3) transitivePeerDependencies: - typescript - '@nomiclabs/hardhat-waffle@2.0.4(ethereum-waffle@3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.2)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': + '@nomiclabs/hardhat-waffle@2.0.4(ethereum-waffle@3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': dependencies: - '@nomiclabs/hardhat-ethers': hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + '@nomiclabs/hardhat-ethers': hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@types/sinon-chai': 3.2.12 '@types/web3': 1.0.19 - ethereum-waffle: 3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.2)(utf-8-validate@5.0.10) + ethereum-waffle: 3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10) ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) '@openzeppelin/contracts-upgradeable@4.9.2': {} @@ -6373,35 +6378,35 @@ snapshots: '@rtsao/scc@1.1.0': {} - '@scure/base@1.1.8': {} + '@scure/base@1.1.9': {} '@scure/bip32@1.1.5': dependencies: '@noble/hashes': 1.2.0 '@noble/secp256k1': 1.7.1 - '@scure/base': 1.1.8 + '@scure/base': 1.1.9 '@scure/bip32@1.4.0': dependencies: '@noble/curves': 1.4.2 '@noble/hashes': 1.4.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.9 '@scure/bip39@1.1.1': dependencies: '@noble/hashes': 1.2.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.9 '@scure/bip39@1.3.0': dependencies: '@noble/hashes': 1.4.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.9 - '@sentry-internal/tracing@7.119.0': + '@sentry-internal/tracing@7.119.2': dependencies: - '@sentry/core': 7.119.0 - '@sentry/types': 7.119.0 - '@sentry/utils': 7.119.0 + '@sentry/core': 7.119.2 + '@sentry/types': 7.119.2 + '@sentry/utils': 7.119.2 '@sentry/core@5.30.0': dependencies: @@ -6416,10 +6421,10 @@ snapshots: '@sentry/types': 7.114.0 '@sentry/utils': 7.114.0 - '@sentry/core@7.119.0': + '@sentry/core@7.119.2': dependencies: - '@sentry/types': 7.119.0 - '@sentry/utils': 7.119.0 + '@sentry/types': 7.119.2 + '@sentry/utils': 7.119.2 '@sentry/hub@5.30.0': dependencies: @@ -6433,11 +6438,11 @@ snapshots: '@sentry/types': 7.114.0 '@sentry/utils': 7.114.0 - '@sentry/integrations@7.119.0': + '@sentry/integrations@7.119.2': dependencies: - '@sentry/core': 7.119.0 - '@sentry/types': 7.119.0 - '@sentry/utils': 7.119.0 + '@sentry/core': 7.119.2 + '@sentry/types': 7.119.2 + '@sentry/utils': 7.119.2 localforage: 1.10.0 '@sentry/minimal@5.30.0': @@ -6460,13 +6465,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@sentry/node@7.119.0': + '@sentry/node@7.119.2': dependencies: - '@sentry-internal/tracing': 7.119.0 - '@sentry/core': 7.119.0 - '@sentry/integrations': 7.119.0 - '@sentry/types': 7.119.0 - '@sentry/utils': 7.119.0 + '@sentry-internal/tracing': 7.119.2 + '@sentry/core': 7.119.2 + '@sentry/integrations': 7.119.2 + '@sentry/types': 7.119.2 + '@sentry/utils': 7.119.2 '@sentry/tracing@5.30.0': dependencies: @@ -6480,7 +6485,7 @@ snapshots: '@sentry/types@7.114.0': {} - '@sentry/types@7.119.0': {} + '@sentry/types@7.119.2': {} '@sentry/utils@5.30.0': dependencies: @@ -6491,9 +6496,9 @@ snapshots: dependencies: '@sentry/types': 7.114.0 - '@sentry/utils@7.119.0': + '@sentry/utils@7.119.2': dependencies: - '@sentry/types': 7.119.0 + '@sentry/types': 7.119.2 '@sindresorhus/is@0.14.0': optional: true @@ -6517,17 +6522,17 @@ snapshots: defer-to-connect: 2.0.1 optional: true - '@tenderly/hardhat-tenderly@1.8.0(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)': + '@tenderly/hardhat-tenderly@1.8.0(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/bignumber': 5.7.0 - '@nomiclabs/hardhat-ethers': hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + '@nomiclabs/hardhat-ethers': hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) axios: 0.27.2 ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) fs-extra: 10.1.0 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) hardhat-deploy: 0.11.34(bufferutil@4.0.8)(utf-8-validate@5.0.10) js-yaml: 4.1.0 - tenderly: 0.6.0(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2) + tenderly: 0.6.0(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3) tslog: 4.9.3 transitivePeerDependencies: - bufferutil @@ -6540,7 +6545,7 @@ snapshots: '@trivago/prettier-plugin-sort-imports@4.3.0(prettier@2.8.8)': dependencies: '@babel/generator': 7.17.7 - '@babel/parser': 7.25.6 + '@babel/parser': 7.25.8 '@babel/traverse': 7.23.2 '@babel/types': 7.17.0 javascript-natural-sort: 0.7.1 @@ -6557,57 +6562,57 @@ snapshots: '@tsconfig/node16@1.0.4': {} - '@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.2))(typescript@5.6.2)': + '@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3)': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) lodash: 4.17.21 - ts-essentials: 7.0.3(typescript@5.6.2) - typechain: 8.3.2(typescript@5.6.2) - typescript: 5.6.2 + ts-essentials: 7.0.3(typescript@5.6.3) + typechain: 8.3.2(typescript@5.6.3) + typescript: 5.6.3 - '@typechain/ethers-v5@2.0.0(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@3.0.0(typescript@5.6.2))': + '@typechain/ethers-v5@2.0.0(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@3.0.0(typescript@5.6.3))': dependencies: ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - typechain: 3.0.0(typescript@5.6.2) + typechain: 3.0.0(typescript@5.6.3) - '@typechain/hardhat@6.1.6(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.2))(typescript@5.6.2))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.2))': + '@typechain/hardhat@6.1.6(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@typechain/ethers-v5': 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.2))(typescript@5.6.2) + '@typechain/ethers-v5': 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3) ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) fs-extra: 9.1.0 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) - typechain: 8.3.2(typescript@5.6.2) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) + typechain: 8.3.2(typescript@5.6.3) '@types/adm-zip@0.5.5': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.11 '@types/bn.js@4.11.6': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.11 '@types/bn.js@5.1.6': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.11 '@types/cacheable-request@6.0.3': dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 20.16.5 + '@types/node': 20.16.11 '@types/responselike': 1.0.3 optional: true - '@types/chai@4.3.19': {} + '@types/chai@4.3.20': {} '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.16.5 + '@types/node': 20.16.11 '@types/http-cache-semantics@4.0.4': optional: true @@ -6618,10 +6623,10 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.11 optional: true - '@types/lodash@4.17.7': {} + '@types/lodash@4.17.10': {} '@types/lru-cache@5.1.1': {} @@ -6629,19 +6634,19 @@ snapshots: '@types/mkdirp@0.5.2': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.11 - '@types/mocha@10.0.8': {} + '@types/mocha@10.0.9': {} '@types/node-fetch@2.6.11': dependencies: - '@types/node': 20.16.5 - form-data: 4.0.0 + '@types/node': 20.16.11 + form-data: 4.0.1 '@types/node@12.20.55': optional: true - '@types/node@20.16.5': + '@types/node@20.16.11': dependencies: undici-types: 6.19.8 @@ -6651,7 +6656,7 @@ snapshots: '@types/pbkdf2@3.1.2': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.11 '@types/prettier@2.7.3': {} @@ -6659,20 +6664,20 @@ snapshots: '@types/resolve@0.0.8': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.11 '@types/responselike@1.0.3': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.11 optional: true '@types/secp256k1@4.0.6': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.11 '@types/sinon-chai@3.2.12': dependencies: - '@types/chai': 4.3.19 + '@types/chai': 4.3.20 '@types/sinon': 17.0.3 '@types/sinon@17.0.3': @@ -6690,34 +6695,34 @@ snapshots: '@types/bn.js': 5.1.6 '@types/underscore': 1.11.15 - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 7.18.0 eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 7.18.0 debug: 4.3.7(supports-color@8.1.1) eslint: 8.57.1 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -6726,21 +6731,21 @@ snapshots: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.3) debug: 4.3.7(supports-color@8.1.1) eslint: 8.57.1 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color '@typescript-eslint/types@7.18.0': {} - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 @@ -6749,18 +6754,18 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) eslint: 8.57.1 transitivePeerDependencies: - supports-color @@ -6838,7 +6843,7 @@ snapshots: ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.0.1 + fast-uri: 3.0.2 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -7040,14 +7045,14 @@ snapshots: axios@0.27.2: dependencies: follow-redirects: 1.15.9(debug@4.3.7) - form-data: 4.0.0 + form-data: 4.0.1 transitivePeerDependencies: - debug - axios@1.7.3: + axios@1.7.7: dependencies: follow-redirects: 1.15.9(debug@4.3.7) - form-data: 4.0.0 + form-data: 4.0.1 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug @@ -7605,16 +7610,17 @@ snapshots: safe-buffer: 5.2.1 optional: true - browserify-rsa@4.1.0: + browserify-rsa@4.1.1: dependencies: bn.js: 5.2.1 randombytes: 2.1.0 + safe-buffer: 5.2.1 optional: true browserify-sign@4.2.3: dependencies: bn.js: 5.2.1 - browserify-rsa: 4.1.0 + browserify-rsa: 4.1.1 create-hash: 1.2.0 create-hmac: 1.1.7 elliptic: 6.5.7 @@ -7627,8 +7633,8 @@ snapshots: browserslist@3.2.8: dependencies: - caniuse-lite: 1.0.30001660 - electron-to-chromium: 1.5.24 + caniuse-lite: 1.0.30001668 + electron-to-chromium: 1.5.36 bs58@4.0.1: dependencies: @@ -7733,7 +7739,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001660: {} + caniuse-lite@1.0.30001668: {} caseless@0.12.0: {} @@ -7950,7 +7956,7 @@ snapshots: cookie@0.4.2: {} - cookie@0.6.0: {} + cookie@0.7.1: {} cookiejar@2.1.4: optional: true @@ -7989,14 +7995,14 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 - cosmiconfig@8.3.6(typescript@5.6.2): + cosmiconfig@8.3.6(typescript@5.6.3): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 create-ecdh@4.0.4: dependencies: @@ -8136,7 +8142,7 @@ snapshots: is-regex: 1.1.4 object-is: 1.1.6 object-keys: 1.1.1 - regexp.prototype.flags: 1.5.2 + regexp.prototype.flags: 1.5.3 deep-extend@0.6.0: {} @@ -8255,7 +8261,7 @@ snapshots: dependencies: keccak: 3.0.4 - electron-to-chromium@1.5.24: {} + electron-to-chromium@1.5.36: {} elliptic@6.5.4: dependencies: @@ -8354,7 +8360,7 @@ snapshots: object-inspect: 1.13.2 object-keys: 1.1.1 object.assign: 4.1.5 - regexp.prototype.flags: 1.5.2 + regexp.prototype.flags: 1.5.3 safe-array-concat: 1.1.2 safe-regex-test: 1.0.3 string.prototype.trim: 1.2.9 @@ -8439,10 +8445,10 @@ snapshots: dependencies: eslint: 8.57.1 - eslint-config-standard@17.1.0(eslint-plugin-import@2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1))(eslint-plugin-n@16.6.2(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1): + eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1))(eslint-plugin-n@16.6.2(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1): dependencies: eslint: 8.57.1 - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) eslint-plugin-n: 16.6.2(eslint@8.57.1) eslint-plugin-promise: 6.6.0(eslint@8.57.1) @@ -8454,11 +8460,11 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.11.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): + eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.3) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: @@ -8471,7 +8477,7 @@ snapshots: eslint: 8.57.1 eslint-compat-utils: 0.5.1(eslint@8.57.1) - eslint-plugin-import@2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -8482,7 +8488,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -8491,9 +8497,10 @@ snapshots: object.groupby: 1.0.3 object.values: 1.2.0 semver: 6.3.1 + string.prototype.trimend: 1.0.8 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -8760,10 +8767,10 @@ snapshots: '@scure/bip32': 1.4.0 '@scure/bip39': 1.3.0 - ethereum-waffle@3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.2)(utf-8-validate@5.0.10): + ethereum-waffle@3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: '@ethereum-waffle/chai': 3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) - '@ethereum-waffle/compiler': 3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.2)(utf-8-validate@5.0.10) + '@ethereum-waffle/compiler': 3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10) '@ethereum-waffle/mock-contract': 3.4.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@ethereum-waffle/provider': 3.4.4(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -8998,14 +9005,14 @@ snapshots: expand-template@2.0.3: {} - express@4.21.0: + express@4.21.1: dependencies: accepts: 1.3.8 array-flatten: 1.1.1 body-parser: 1.20.3 content-disposition: 0.5.4 content-type: 1.0.5 - cookie: 0.6.0 + cookie: 0.7.1 cookie-signature: 1.0.6 debug: 2.6.9 depd: 2.0.0 @@ -9084,7 +9091,7 @@ snapshots: fast-levenshtein@2.0.6: {} - fast-uri@3.0.1: {} + fast-uri@3.0.2: {} fastq@1.17.1: dependencies: @@ -9196,7 +9203,7 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 - form-data@4.0.0: + form-data@4.0.1: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 @@ -9375,7 +9382,7 @@ snapshots: jackspeak: 3.4.3 minimatch: 9.0.5 minipass: 7.1.2 - package-json-from-dist: 1.0.0 + package-json-from-dist: 1.0.1 path-scurry: 1.11.1 glob@5.0.15: @@ -9525,26 +9532,26 @@ snapshots: ajv: 6.12.6 har-schema: 2.0.0 - hardhat-contract-sizer@2.10.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): + hardhat-contract-sizer@2.10.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)): dependencies: chalk: 4.1.2 cli-table3: 0.6.5 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) strip-ansi: 6.0.1 - hardhat-dependency-compiler@1.2.1(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): + hardhat-dependency-compiler@1.2.1(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)): dependencies: - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): + hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)): dependencies: ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - hardhat-deploy-tenderly@0.2.0(hardhat-deploy@0.11.34(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): + hardhat-deploy-tenderly@0.2.0(hardhat-deploy@0.11.34(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)): dependencies: axios: 0.24.0 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) hardhat-deploy: 0.11.34(bufferutil@4.0.8)(utf-8-validate@5.0.10) js-yaml: 4.1.0 transitivePeerDependencies: @@ -9570,7 +9577,7 @@ snapshots: debug: 4.3.7(supports-color@8.1.1) enquirer: 2.4.1 ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - form-data: 4.0.0 + form-data: 4.0.1 fs-extra: 10.1.0 match-all: 1.2.6 murmur-128: 0.2.1 @@ -9581,17 +9588,17 @@ snapshots: - supports-color - utf-8-validate - hardhat-storage-layout@0.1.7(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): + hardhat-storage-layout@0.1.7(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)): dependencies: console-table-printer: 2.12.1 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - hardhat-watcher@2.5.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): + hardhat-watcher@2.5.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)): dependencies: chokidar: 3.6.0 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10): + hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: '@ethersproject/abi': 5.7.0 '@metamask/eth-sig-util': 4.0.1 @@ -9637,8 +9644,8 @@ snapshots: uuid: 8.3.2 ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) - typescript: 5.6.2 + ts-node: 10.9.2(@types/node@20.16.11)(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - bufferutil - c-kzg @@ -10042,6 +10049,8 @@ snapshots: jsesc@2.5.2: {} + jsesc@3.0.2: {} + json-buffer@3.0.0: optional: true @@ -10613,7 +10622,7 @@ snapshots: nice-try@1.0.5: {} - node-abi@3.67.0: + node-abi@3.68.0: dependencies: semver: 7.6.3 @@ -10826,7 +10835,7 @@ snapshots: p-try@1.0.0: {} - package-json-from-dist@1.0.0: {} + package-json-from-dist@1.0.1: {} parent-module@1.0.1: dependencies: @@ -10854,7 +10863,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.25.7 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -10972,7 +10981,7 @@ snapshots: minimist: 1.2.8 mkdirp-classic: 0.5.3 napi-build-utils: 1.0.2 - node-abi: 3.67.0 + node-abi: 3.68.0 pump: 3.0.2 rc: 1.2.8 simple-get: 4.0.1 @@ -11040,7 +11049,7 @@ snapshots: public-encrypt@4.0.3: dependencies: bn.js: 4.12.0 - browserify-rsa: 4.1.0 + browserify-rsa: 4.1.1 create-hash: 1.2.0 parse-asn1: 5.1.7 randombytes: 2.1.0 @@ -11211,7 +11220,7 @@ snapshots: extend-shallow: 3.0.2 safe-regex: 1.1.0 - regexp.prototype.flags@1.5.2: + regexp.prototype.flags@1.5.3: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -11439,7 +11448,7 @@ snapshots: dependencies: body-parser: 1.20.3 cors: 2.8.5 - express: 4.21.0 + express: 4.21.1 request: 2.88.2 xhr: 2.6.0 transitivePeerDependencies: @@ -11606,7 +11615,7 @@ snapshots: transitivePeerDependencies: - debug - solhint@3.6.2(typescript@5.6.2): + solhint@3.6.2(typescript@5.6.3): dependencies: '@solidity-parser/parser': 0.16.2 ajv: 6.12.6 @@ -11614,7 +11623,7 @@ snapshots: ast-parents: 0.0.1 chalk: 4.1.2 commander: 10.0.1 - cosmiconfig: 8.3.6(typescript@5.6.2) + cosmiconfig: 8.3.6(typescript@5.6.3) fast-diff: 1.3.0 glob: 8.1.0 ignore: 5.3.2 @@ -11630,7 +11639,7 @@ snapshots: transitivePeerDependencies: - typescript - solidity-coverage@0.8.13(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): + solidity-coverage@0.8.13(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)): dependencies: '@ethersproject/abi': 5.7.0 '@solidity-parser/parser': 0.16.2 @@ -11641,7 +11650,7 @@ snapshots: ghost-testrpc: 0.0.2 global-modules: 2.0.0 globby: 10.0.2 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) jsonschema: 1.4.1 lodash: 4.17.21 mocha: 10.7.3 @@ -11921,20 +11930,20 @@ snapshots: yallist: 3.1.1 optional: true - tenderly@0.6.0(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))(typescript@5.6.2): + tenderly@0.6.0(ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3))(typescript@5.6.3): dependencies: axios: 0.27.2 cli-table3: 0.6.5 commander: 9.5.0 - express: 4.21.0 + express: 4.21.1 hyperlinker: 1.0.0 js-yaml: 4.1.0 open: 8.4.2 prompts: 2.4.2 tslog: 4.9.3 optionalDependencies: - ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) - typescript: 5.6.2 + ts-node: 10.9.2(@types/node@20.16.11)(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - debug - supports-color @@ -12002,9 +12011,9 @@ snapshots: trim-right@1.0.1: {} - ts-api-utils@1.3.0(typescript@5.6.2): + ts-api-utils@1.3.0(typescript@5.6.3): dependencies: - typescript: 5.6.2 + typescript: 5.6.3 ts-command-line-args@2.5.1: dependencies: @@ -12015,13 +12024,13 @@ snapshots: ts-essentials@1.0.4: {} - ts-essentials@6.0.7(typescript@5.6.2): + ts-essentials@6.0.7(typescript@5.6.3): dependencies: - typescript: 5.6.2 + typescript: 5.6.3 - ts-essentials@7.0.3(typescript@5.6.2): + ts-essentials@7.0.3(typescript@5.6.3): dependencies: - typescript: 5.6.2 + typescript: 5.6.3 ts-generator@0.1.1: dependencies: @@ -12035,21 +12044,21 @@ snapshots: resolve: 1.22.8 ts-essentials: 1.0.4 - ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2): + ts-node@10.9.2(@types/node@20.16.11)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.16.5 + '@types/node': 20.16.11 acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.6.2 + typescript: 5.6.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -12101,20 +12110,20 @@ snapshots: type@2.7.3: {} - typechain@3.0.0(typescript@5.6.2): + typechain@3.0.0(typescript@5.6.3): dependencies: command-line-args: 4.0.7 debug: 4.3.7(supports-color@8.1.1) fs-extra: 7.0.1 js-sha3: 0.8.0 lodash: 4.17.21 - ts-essentials: 6.0.7(typescript@5.6.2) + ts-essentials: 6.0.7(typescript@5.6.3) ts-generator: 0.1.1 transitivePeerDependencies: - supports-color - typescript - typechain@8.3.2(typescript@5.6.2): + typechain@8.3.2(typescript@5.6.3): dependencies: '@types/prettier': 2.7.3 debug: 4.3.7(supports-color@8.1.1) @@ -12125,8 +12134,8 @@ snapshots: mkdirp: 1.0.4 prettier: 2.8.8 ts-command-line-args: 2.5.1 - ts-essentials: 7.0.3(typescript@5.6.2) - typescript: 5.6.2 + ts-essentials: 7.0.3(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -12168,7 +12177,7 @@ snapshots: typedarray@0.0.6: {} - typescript@5.6.2: {} + typescript@5.6.3: {} typewise-core@1.2.0: {}