diff --git a/contracts/vortex/CarbonVortex.sol b/contracts/vortex/CarbonVortex.sol index 2d1056b9..e4766ca2 100644 --- a/contracts/vortex/CarbonVortex.sol +++ b/contracts/vortex/CarbonVortex.sol @@ -135,8 +135,8 @@ contract CarbonVortex is ICarbonVortex, Upgradeable, ReentrancyGuardUpgradeable, * @dev performs contract-specific initialization */ function __CarbonVortex_init_unchained() internal onlyInitializing { - // set rewards PPM to 5000 - _setRewardsPPM(5000); + // set rewards PPM to 1000 + _setRewardsPPM(1000); // set price reset multiplier to 2x _setPriceResetMultiplier(2); // set min token sale amount multiplier to 4x diff --git a/deployments/base/.chainId b/deployments/base/.chainId new file mode 100644 index 00000000..ef1ec3d2 --- /dev/null +++ b/deployments/base/.chainId @@ -0,0 +1 @@ +8453 diff --git a/deployments/base/.migrations.json b/deployments/base/.migrations.json new file mode 100644 index 00000000..cb3ceabc --- /dev/null +++ b/deployments/base/.migrations.json @@ -0,0 +1,4 @@ +{ + "0001-ProxyAdmin": 1727774416, + "0002-CarbonVortex": 1727774431 +} \ No newline at end of file diff --git a/deployments/base/CarbonVortex.json b/deployments/base/CarbonVortex.json new file mode 100644 index 00000000..45da483c --- /dev/null +++ b/deployments/base/CarbonVortex.json @@ -0,0 +1,1592 @@ +{ + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "abi": [ + { + "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" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "transactionIndex": 38, + "gasUsed": "813785", + "logsBloom": "0x000800048200000088000000100000004800400100000000100000000000000000000000000200000000000000008000000000000008000000100000000000000000000000000000000008204000020000000000000000020000000000000000080000000200004010000800000008000020008000000010100000000000000000000100000000010080000000000000000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000200000000000000020000000100040000000140000000000000400000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea", + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "logs": [ + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000c7dd38e64822108446872c5c2105308058c5c55c" + ], + "data": "0x", + "logIndex": 93, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 94, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 95, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 96, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 97, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 98, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 99, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 100, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 101, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 102, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 103, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 104, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0d39990e1c38b50d0b7f6911525535fbacb4c26", + "logIndex": 105, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + } + ], + "blockNumber": 20492539, + "cumulativeGasUsed": "6234041", + "status": 1, + "byzantium": true + }, + "args": [ + "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/base/CarbonVortex_Implementation.json b/deployments/base/CarbonVortex_Implementation.json new file mode 100644 index 00000000..ac9f4594 --- /dev/null +++ b/deployments/base/CarbonVortex_Implementation.json @@ -0,0 +1,2062 @@ +{ + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICarbonController", + "name": "carbonController", + "type": "address" + }, + { + "internalType": "contract IVault", + "name": "vault", + "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" + } + ], + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "transactionIndex": 30, + "gasUsed": "5131351", + "logsBloom": "0x000800048200000088000000000000000800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000000000000000000200000000000000000000880000000200004000000800000008000020000000000010100000000000000000000100000000010000000004000000000000000000a0000000008000040000000000000000000004000000000400000000000000000000101000200000000000000000000000100040000000140000000000000000000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1", + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "logs": [ + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 84, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 85, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 86, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 87, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 88, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 89, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 90, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 91, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 92, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 93, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + }, + { + "transactionIndex": 30, + "blockNumber": 20492536, + "transactionHash": "0xc026b2fdae0184ea2cb0bff02629c5bb63f80cd7227c17e7b1fe91a0e0882d08", + "address": "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 94, + "blockHash": "0x3861b84b84464a9e5e2e16e81131a14f76e88bac54c79754d9d72e1cde3f5be1" + } + ], + "blockNumber": 20492536, + "cumulativeGasUsed": "10546772", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0xD2b2D272c30d9a0ff3DbaFe848DA7e2f194f697F", + "0xE1aB22cd03377db66aeb15687E881Eab9e1a26C1", + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "0x0000000000000000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "7c1f6a32868c060ab88825316a91cddf", + "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\":\"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\":{\"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 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 *\\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 // 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 address payable transferAddress,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(transferAddress) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\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 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 }\\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 3;\\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 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 // 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\":\"0xb2d6cc49ecdc95d58e6047a367f22305082e24d89cbdada6a318f351a42bca90\",\"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": "0x6101206040523480156200001257600080fd5b506040516200684438038062006844833981016040819052620000359162000dc8565b8262000041816200008a565b826200004d816200008a565b6001600160a01b0380881660805286811660a05285811660c05284811660e0528316610100526200007d620000b5565b5050505050505062001023565b6001600160a01b038116620000b25760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000d65750600054600160ff909116105b80620000f25750303b158015620000f2575060005460ff166001145b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200017f576000805461ff0019166101001790555b62000189620001d2565b8015620000b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200022e5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002386200024e565b62000242620002be565b6200024c62000324565b565b600054610100900460ff16620002aa5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002b462000449565b6200024c620004a5565b600054610100900460ff166200031a5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200024c62000545565b600054610100900460ff16620003805760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200038d6103e8620005a8565b6200039960026200061d565b620003a56004620006a0565b620003b261a8c06200072b565b620003bf61a8c0620007ac565b620003cd620d2f006200083f565b6200040d620003ed60e0516001600160a01b0316620008c060201b60201c565b620003fa90600a62000f9c565b6200040790606462000fb6565b62000946565b60e0516200024c90620004296001600160a01b038216620008c0565b6200043690600a62000f9c565b6200044390600a62000fb6565b62000a2e565b600054610100900460ff166200024c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600054610100900460ff16620005015760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b60c9805461ffff191660031790556200052a600080516020620068048339815191528062000ada565b6200024c600080516020620068048339815191523362000b25565b600054610100900460ff16620005a15760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600160fb55565b61012e5463ffffffff9081169082168103620005c2575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a1291015b60405180910390a15050565b61012e5463ffffffff640100000000909104811690821681036200063f575050565b61012e805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb910162000611565b61012e5463ffffffff6801000000000000000090910481169082168103620006c6575050565b61012e805463ffffffff60401b19166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1910162000611565b61012e5463ffffffff600160a01b909104811690821681036200074c575050565b61012e805463ffffffff60a01b1916600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3910162000611565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103620007d6575050565b61012e805463ffffffff60601b19166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328910162000611565b61012e5463ffffffff600160801b9091048116908216810362000860575050565b61012e805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b910162000611565b6000620008cd8262000b35565b15620008db57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000940919062000fe4565b92915050565b610133546001600160801b03908116908216810362000963575050565b61013380546001600160801b0319166001600160801b0384811691821792839055600160801b9092049091161115620009ed5760e051620009ce90620009c890620009b8906001600160a01b03163062000b5d565b6001600160801b03851662000bf9565b62000c11565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3910162000611565b6001600160a01b038216600090815261013260205260409020546001600160801b03908116908216810362000a6257505050565b6001600160a01b0383166000818152610132602090815260409182902080546001600160801b0319166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910160405180910390a2505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000b31828262000c80565b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1462000940565b600062000b6a8362000b35565b1562000b8257506001600160a01b0381163162000940565b826040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801562000bcc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf2919062001009565b9392505050565b600081831062000c0a578162000bf2565b5090919050565b60006001600160801b0382111562000c7c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b606482015260840162000152565b5090565b62000c8c828262000cab565b600082815260976020526040902062000ca6908262000d4f565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1662000b315760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000d0b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000bf2836001600160a01b038416600081815260018301602052604081205462000da95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000940565b50600062000940565b6001600160a01b0381168114620000b257600080fd5b600080600080600060a0868803121562000de157600080fd5b855162000dee8162000db2565b602087015190955062000e018162000db2565b604087015190945062000e148162000db2565b606087015190935062000e278162000db2565b608087015190925062000e3a8162000db2565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ea5576001600160801b0382900482111562000e895762000e8962000e48565b8085161562000e9757918102915b93841c939080029062000e63565b509250929050565b60008262000ebe5750600162000940565b8162000ecd5750600062000940565b816001811462000ee6576002811462000ef15762000f2c565b600191505062000940565b60ff84111562000f055762000f0562000e48565b6001841b91506001600160801b0382111562000f255762000f2562000e48565b5062000940565b5060208310610133831016604e8410600b841016171562000f6b575081810a6001600160801b0381111562000f655762000f6562000e48565b62000940565b62000f77838362000e5e565b6001600160801b0381900482111562000f945762000f9462000e48565b029392505050565b600062000bf260ff84166001600160801b03841662000ead565b6001600160801b0381811683821602808216919082811462000fdc5762000fdc62000e48565b505092915050565b60006020828403121562000ff757600080fd5b815160ff8116811462000bf257600080fd5b6000602082840312156200101c57600080fd5b5051919050565b60805160a05160c05160e0516101005161565a620011aa600039600081816104d601528181610f1301528181610fec0152818161301501528181613118015281816131b001528181613687015261377a0152600081816103f00152818161091801528181610fb5015281816110250152818161153301528181611ad201528181611c1e015281816122f1015281816123a001528181612462015281816124d70152818161255401528181612af001528181612f550152818161317601528181613285015281816132ea01528181613335015281816133960152818161341601528181613525015281816135a901528181613637015281816136c0015281816137b10152818161381c0152818161386401528181613f1201528181613f5f0152613f830152600081816110470152818161309f0152818161313b01526136e2015260008181610c5401528181610d8b01528181610df701528181611703015261173f015260008181610c2e01528181610cfa015281816116240152611689015261565a6000f3fe6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + "deployedBytecode": "0x6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a", + "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 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 + }, + "storageLayout": { + "storage": [ + { + "astId": 585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 588, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1318, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1591, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 479, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 33, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roleMembers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)" + }, + { + "astId": 143, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializations", + "offset": 0, + "slot": "201", + "type": "t_uint16" + }, + { + "astId": 12184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 761, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 830, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12536, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_totalCollected", + "offset": 0, + "slot": "301", + "type": "t_uint256" + }, + { + "astId": 12538, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_rewardsPPM", + "offset": 0, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12540, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceResetMultiplier", + "offset": 4, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12542, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmountMultiplier", + "offset": 8, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12544, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLife", + "offset": 12, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12546, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLifeOnReset", + "offset": 16, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12548, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceDecayHalfLife", + "offset": 20, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12553, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_disabledPairs", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_bool)" + }, + { + "astId": 12558, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_tradingStartTimes", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)" + }, + { + "astId": 12564, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialPrice", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)" + }, + { + "astId": 12569, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmounts", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)" + }, + { + "astId": 12572, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenSaleAmount", + "offset": 0, + "slot": "307", + "type": "t_struct(SaleAmount)14811_storage" + }, + { + "astId": 12578, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "308", + "type": "t_array(t_uint256)43_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)43_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[43]", + "numberOfBytes": "1376" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)2901_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_bool)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => struct ICarbonVortex.Price)", + "numberOfBytes": "32", + "value": "t_struct(Price)14806_storage" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint128)", + "numberOfBytes": "32", + "value": "t_uint128" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_struct(AddressSet)2901_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 2900, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)2586_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Price)14806_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.Price", + "members": [ + { + "astId": 14803, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "sourceAmount", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14805, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "targetAmount", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SaleAmount)14811_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.SaleAmount", + "members": [ + { + "astId": 14808, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "initial", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14810, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "current", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)2586_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 2581, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 2585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_userDefinedValueType(Token)10748": { + "encoding": "inplace", + "label": "Token", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/CarbonVortex_Proxy.json b/deployments/base/CarbonVortex_Proxy.json new file mode 100644 index 00000000..6438efa4 --- /dev/null +++ b/deployments/base/CarbonVortex_Proxy.json @@ -0,0 +1,369 @@ +{ + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "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" + } + ], + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "transactionIndex": 38, + "gasUsed": "813785", + "logsBloom": "0x000800048200000088000000100000004800400100000000100000000000000000000000000200000000000000008000000000000008000000100000000000000000000000000000000008204000020000000000000000020000000000000000080000000200004010000800000008000020008000000010100000000000000000000100000000010080000000000000000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000200000000000000020000000100040000000140000000000000400000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea", + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "logs": [ + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000c7dd38e64822108446872c5c2105308058c5c55c" + ], + "data": "0x", + "logIndex": 93, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 94, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 95, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 96, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 97, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 98, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 99, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 100, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 101, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 102, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 103, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 104, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + }, + { + "transactionIndex": 38, + "blockNumber": 20492539, + "transactionHash": "0xc9b9bae1f5a4822046a948c099d25508fb512ea22e481f5bdfb3279042deb699", + "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0d39990e1c38b50d0b7f6911525535fbacb4c26", + "logIndex": 105, + "blockHash": "0x11666e42d1ea40e98b1e2f0edfc4274af2eec88a1a661c7bd7407192b9aef7ea" + } + ], + "blockNumber": 20492539, + "cumulativeGasUsed": "6234041", + "status": 1, + "byzantium": true + }, + "args": [ + "0xC7Dd38e64822108446872c5C2105308058c5C55C", + "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/base/ProxyAdmin.json b/deployments/base/ProxyAdmin.json new file mode 100644 index 00000000..2d5c5c4a --- /dev/null +++ b/deployments/base/ProxyAdmin.json @@ -0,0 +1,246 @@ +{ + "address": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x2006bd17706fb4d17ceb7442c35e20a75537439d6525529ec8e9f5da34a832d0", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", + "transactionIndex": 92, + "gasUsed": "483751", + "logsBloom": "0x00000000820000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000001000000000000000000000000000000000100020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000080000000000000000000200000000000000000000000000000", + "blockHash": "0x147d834ce1a00ac106cac6ae7cd68af8fcf68c7fbc42dec10068a206acdd0c7d", + "transactionHash": "0x2006bd17706fb4d17ceb7442c35e20a75537439d6525529ec8e9f5da34a832d0", + "logs": [ + { + "transactionIndex": 92, + "blockNumber": 20492531, + "transactionHash": "0x2006bd17706fb4d17ceb7442c35e20a75537439d6525529ec8e9f5da34a832d0", + "address": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 356, + "blockHash": "0x147d834ce1a00ac106cac6ae7cd68af8fcf68c7fbc42dec10068a206acdd0c7d" + } + ], + "blockNumber": 20492531, + "cumulativeGasUsed": "16326950", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\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\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 Returns the current admin.\\n */\\n function _getAdmin() internal view 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 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(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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\"},\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\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 *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\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(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(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 * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\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 _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\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 _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\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 function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"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/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "devdoc": { + "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", + "kind": "dev", + "methods": { + "changeProxyAdmin(address,address)": { + "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." + }, + "getProxyAdmin(address)": { + "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "getProxyImplementation(address)": { + "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgrade(address,address)": { + "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." + }, + "upgradeAndCall(address,address,bytes)": { + "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4735, + "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/blast/.chainId b/deployments/blast/.chainId new file mode 100644 index 00000000..4c12eb97 --- /dev/null +++ b/deployments/blast/.chainId @@ -0,0 +1 @@ +81457 diff --git a/deployments/blast/.migrations.json b/deployments/blast/.migrations.json new file mode 100644 index 00000000..66540373 --- /dev/null +++ b/deployments/blast/.migrations.json @@ -0,0 +1,3 @@ +{ + "0001-ProxyAdmin": 1727709422 +} \ No newline at end of file diff --git a/deployments/blast/CarbonVortex.json b/deployments/blast/CarbonVortex.json new file mode 100644 index 00000000..e6ead293 --- /dev/null +++ b/deployments/blast/CarbonVortex.json @@ -0,0 +1,1592 @@ +{ + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "abi": [ + { + "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" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "transactionIndex": 12, + "gasUsed": "813785", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000000000200000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200004020200800000008000020008002000010100000000000000000000100000000010000000000000000000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000200000000000000020004000100040000000140000000000000400000120200000040020000000010040000000000000000000000080000000000000000000000000000000", + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e", + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "logs": [ + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000059f21012b2e9ba67ce6a7605e74f945d0d4c84ea" + ], + "data": "0x", + "logIndex": 113, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 114, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 115, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 116, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 117, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 118, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 119, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 120, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 121, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 122, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 123, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 124, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c05ea305235a67c7095a32ad4a2ee2688ade636", + "logIndex": 125, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + } + ], + "blockNumber": 9449811, + "cumulativeGasUsed": "2462075", + "status": 1, + "byzantium": true + }, + "args": [ + "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/blast/CarbonVortex_Implementation.json b/deployments/blast/CarbonVortex_Implementation.json new file mode 100644 index 00000000..fa6824b6 --- /dev/null +++ b/deployments/blast/CarbonVortex_Implementation.json @@ -0,0 +1,2062 @@ +{ + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICarbonController", + "name": "carbonController", + "type": "address" + }, + { + "internalType": "contract IVault", + "name": "vault", + "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" + } + ], + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "transactionIndex": 7, + "gasUsed": "5131375", + "logsBloom": "0x000800048200000088000000000000000800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000000000000000000000000000000000000000080000000200004000000800000008000020000000000010100000000000000000000100000000010000000000000000000000000000a0000000008000040000000000000000000004000000000400000000000000000000101000200000000000000000000000100040001001140000000000000000000120200000040020000000010000000000000000000000000080000000000000000000000000001000", + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c", + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "logs": [ + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 3, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 4, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 5, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 7, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 8, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 9, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 10, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + }, + { + "transactionIndex": 7, + "blockNumber": 9449806, + "transactionHash": "0xa0abbf5b7a123c217c2eb6cb3d658f106f8f0522347ee6009d5fca285cae6f1a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 11, + "blockHash": "0xe39d53544e71c5a91690d5c546845f599d33000176a511f48ad01c796d96ce2c" + } + ], + "blockNumber": 9449806, + "cumulativeGasUsed": "6574591", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", + "0xE1aB22cd03377db66aeb15687E881Eab9e1a26C1", + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "0x4300000000000000000000000000000000000004" + ], + "numDeployments": 1, + "solcInputHash": "7c1f6a32868c060ab88825316a91cddf", + "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\":\"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\":{\"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 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 *\\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 // 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 address payable transferAddress,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(transferAddress) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\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 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 }\\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 3;\\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 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 // 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\":\"0xb2d6cc49ecdc95d58e6047a367f22305082e24d89cbdada6a318f351a42bca90\",\"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": "0x6101206040523480156200001257600080fd5b506040516200684438038062006844833981016040819052620000359162000dc8565b8262000041816200008a565b826200004d816200008a565b6001600160a01b0380881660805286811660a05285811660c05284811660e0528316610100526200007d620000b5565b5050505050505062001023565b6001600160a01b038116620000b25760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000d65750600054600160ff909116105b80620000f25750303b158015620000f2575060005460ff166001145b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200017f576000805461ff0019166101001790555b62000189620001d2565b8015620000b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200022e5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002386200024e565b62000242620002be565b6200024c62000324565b565b600054610100900460ff16620002aa5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002b462000449565b6200024c620004a5565b600054610100900460ff166200031a5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200024c62000545565b600054610100900460ff16620003805760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200038d6103e8620005a8565b6200039960026200061d565b620003a56004620006a0565b620003b261a8c06200072b565b620003bf61a8c0620007ac565b620003cd620d2f006200083f565b6200040d620003ed60e0516001600160a01b0316620008c060201b60201c565b620003fa90600a62000f9c565b6200040790606462000fb6565b62000946565b60e0516200024c90620004296001600160a01b038216620008c0565b6200043690600a62000f9c565b6200044390600a62000fb6565b62000a2e565b600054610100900460ff166200024c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600054610100900460ff16620005015760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b60c9805461ffff191660031790556200052a600080516020620068048339815191528062000ada565b6200024c600080516020620068048339815191523362000b25565b600054610100900460ff16620005a15760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600160fb55565b61012e5463ffffffff9081169082168103620005c2575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a1291015b60405180910390a15050565b61012e5463ffffffff640100000000909104811690821681036200063f575050565b61012e805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb910162000611565b61012e5463ffffffff6801000000000000000090910481169082168103620006c6575050565b61012e805463ffffffff60401b19166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1910162000611565b61012e5463ffffffff600160a01b909104811690821681036200074c575050565b61012e805463ffffffff60a01b1916600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3910162000611565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103620007d6575050565b61012e805463ffffffff60601b19166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328910162000611565b61012e5463ffffffff600160801b9091048116908216810362000860575050565b61012e805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b910162000611565b6000620008cd8262000b35565b15620008db57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000940919062000fe4565b92915050565b610133546001600160801b03908116908216810362000963575050565b61013380546001600160801b0319166001600160801b0384811691821792839055600160801b9092049091161115620009ed5760e051620009ce90620009c890620009b8906001600160a01b03163062000b5d565b6001600160801b03851662000bf9565b62000c11565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3910162000611565b6001600160a01b038216600090815261013260205260409020546001600160801b03908116908216810362000a6257505050565b6001600160a01b0383166000818152610132602090815260409182902080546001600160801b0319166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910160405180910390a2505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000b31828262000c80565b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1462000940565b600062000b6a8362000b35565b1562000b8257506001600160a01b0381163162000940565b826040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801562000bcc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf2919062001009565b9392505050565b600081831062000c0a578162000bf2565b5090919050565b60006001600160801b0382111562000c7c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b606482015260840162000152565b5090565b62000c8c828262000cab565b600082815260976020526040902062000ca6908262000d4f565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1662000b315760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000d0b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000bf2836001600160a01b038416600081815260018301602052604081205462000da95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000940565b50600062000940565b6001600160a01b0381168114620000b257600080fd5b600080600080600060a0868803121562000de157600080fd5b855162000dee8162000db2565b602087015190955062000e018162000db2565b604087015190945062000e148162000db2565b606087015190935062000e278162000db2565b608087015190925062000e3a8162000db2565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ea5576001600160801b0382900482111562000e895762000e8962000e48565b8085161562000e9757918102915b93841c939080029062000e63565b509250929050565b60008262000ebe5750600162000940565b8162000ecd5750600062000940565b816001811462000ee6576002811462000ef15762000f2c565b600191505062000940565b60ff84111562000f055762000f0562000e48565b6001841b91506001600160801b0382111562000f255762000f2562000e48565b5062000940565b5060208310610133831016604e8410600b841016171562000f6b575081810a6001600160801b0381111562000f655762000f6562000e48565b62000940565b62000f77838362000e5e565b6001600160801b0381900482111562000f945762000f9462000e48565b029392505050565b600062000bf260ff84166001600160801b03841662000ead565b6001600160801b0381811683821602808216919082811462000fdc5762000fdc62000e48565b505092915050565b60006020828403121562000ff757600080fd5b815160ff8116811462000bf257600080fd5b6000602082840312156200101c57600080fd5b5051919050565b60805160a05160c05160e0516101005161565a620011aa600039600081816104d601528181610f1301528181610fec0152818161301501528181613118015281816131b001528181613687015261377a0152600081816103f00152818161091801528181610fb5015281816110250152818161153301528181611ad201528181611c1e015281816122f1015281816123a001528181612462015281816124d70152818161255401528181612af001528181612f550152818161317601528181613285015281816132ea01528181613335015281816133960152818161341601528181613525015281816135a901528181613637015281816136c0015281816137b10152818161381c0152818161386401528181613f1201528181613f5f0152613f830152600081816110470152818161309f0152818161313b01526136e2015260008181610c5401528181610d8b01528181610df701528181611703015261173f015260008181610c2e01528181610cfa015281816116240152611689015261565a6000f3fe6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + "deployedBytecode": "0x6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a", + "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 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 + }, + "storageLayout": { + "storage": [ + { + "astId": 585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 588, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1318, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1591, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 479, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 33, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roleMembers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)" + }, + { + "astId": 143, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializations", + "offset": 0, + "slot": "201", + "type": "t_uint16" + }, + { + "astId": 12184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 761, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 830, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12536, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_totalCollected", + "offset": 0, + "slot": "301", + "type": "t_uint256" + }, + { + "astId": 12538, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_rewardsPPM", + "offset": 0, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12540, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceResetMultiplier", + "offset": 4, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12542, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmountMultiplier", + "offset": 8, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12544, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLife", + "offset": 12, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12546, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLifeOnReset", + "offset": 16, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12548, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceDecayHalfLife", + "offset": 20, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12553, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_disabledPairs", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_bool)" + }, + { + "astId": 12558, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_tradingStartTimes", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)" + }, + { + "astId": 12564, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialPrice", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)" + }, + { + "astId": 12569, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmounts", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)" + }, + { + "astId": 12572, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenSaleAmount", + "offset": 0, + "slot": "307", + "type": "t_struct(SaleAmount)14811_storage" + }, + { + "astId": 12578, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "308", + "type": "t_array(t_uint256)43_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)43_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[43]", + "numberOfBytes": "1376" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)2901_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_bool)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => struct ICarbonVortex.Price)", + "numberOfBytes": "32", + "value": "t_struct(Price)14806_storage" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint128)", + "numberOfBytes": "32", + "value": "t_uint128" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_struct(AddressSet)2901_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 2900, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)2586_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Price)14806_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.Price", + "members": [ + { + "astId": 14803, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "sourceAmount", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14805, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "targetAmount", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SaleAmount)14811_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.SaleAmount", + "members": [ + { + "astId": 14808, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "initial", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14810, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "current", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)2586_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 2581, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 2585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_userDefinedValueType(Token)10748": { + "encoding": "inplace", + "label": "Token", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/blast/CarbonVortex_Proxy.json b/deployments/blast/CarbonVortex_Proxy.json new file mode 100644 index 00000000..7b069e3f --- /dev/null +++ b/deployments/blast/CarbonVortex_Proxy.json @@ -0,0 +1,369 @@ +{ + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "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" + } + ], + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "transactionIndex": 12, + "gasUsed": "813785", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000000000200000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200004020200800000008000020008002000010100000000000000000000100000000010000000000000000000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000200000000000000020004000100040000000140000000000000400000120200000040020000000010040000000000000000000000080000000000000000000000000000000", + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e", + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "logs": [ + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000059f21012b2e9ba67ce6a7605e74f945d0d4c84ea" + ], + "data": "0x", + "logIndex": 113, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 114, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 115, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 116, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 117, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 118, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 119, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 120, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 121, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 122, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 123, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 124, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + }, + { + "transactionIndex": 12, + "blockNumber": 9449811, + "transactionHash": "0x5d5b246a69cf8dfd0e14f4cc7c958718287326d17b30d6c7fed921ea7d24244a", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c05ea305235a67c7095a32ad4a2ee2688ade636", + "logIndex": 125, + "blockHash": "0x38dba65671aa862051375e8d4a6002ee5d20426ac3305bd9ada4369bd249144e" + } + ], + "blockNumber": 9449811, + "cumulativeGasUsed": "2462075", + "status": 1, + "byzantium": true + }, + "args": [ + "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/blast/ProxyAdmin.json b/deployments/blast/ProxyAdmin.json new file mode 100644 index 00000000..096280ba --- /dev/null +++ b/deployments/blast/ProxyAdmin.json @@ -0,0 +1,246 @@ +{ + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x9942d02f5d0bb78f54e3fb8c1733c99827402d725361e9d39747d930c1fc480b", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "transactionIndex": 9, + "gasUsed": "483751", + "logsBloom": "0x00000000820000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000400000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000040000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4b7a4e1607512ebb45fe8f542cb13e013be8f10fb624e0ca29f578cc12bbe498", + "transactionHash": "0x9942d02f5d0bb78f54e3fb8c1733c99827402d725361e9d39747d930c1fc480b", + "logs": [ + { + "transactionIndex": 9, + "blockNumber": 9449800, + "transactionHash": "0x9942d02f5d0bb78f54e3fb8c1733c99827402d725361e9d39747d930c1fc480b", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 24, + "blockHash": "0x4b7a4e1607512ebb45fe8f542cb13e013be8f10fb624e0ca29f578cc12bbe498" + } + ], + "blockNumber": 9449800, + "cumulativeGasUsed": "2067783", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\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\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 Returns the current admin.\\n */\\n function _getAdmin() internal view 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 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(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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\"},\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\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 *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\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(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(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 * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\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 _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\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 _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\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 function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"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/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "devdoc": { + "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", + "kind": "dev", + "methods": { + "changeProxyAdmin(address,address)": { + "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." + }, + "getProxyAdmin(address)": { + "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "getProxyImplementation(address)": { + "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgrade(address,address)": { + "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." + }, + "upgradeAndCall(address,address,bytes)": { + "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4735, + "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/celo/.migrations.json b/deployments/celo/.migrations.json index bb4b9242..7a1ca613 100644 --- a/deployments/celo/.migrations.json +++ b/deployments/celo/.migrations.json @@ -1,5 +1,7 @@ { "0001-ProxyAdmin": 1721813148, "0002-Voucher": 1721813170, - "0003-CarbonController": 1721813216 + "0003-CarbonController": 1721813216, + "0004-CarbonVortex": 1727788255, + "0005-CarbonVortex-upgrade": 1727792863 } \ No newline at end of file diff --git a/deployments/celo/CarbonVortex.json b/deployments/celo/CarbonVortex.json new file mode 100644 index 00000000..bd9d1dfa --- /dev/null +++ b/deployments/celo/CarbonVortex.json @@ -0,0 +1,1595 @@ +{ + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "abi": [ + { + "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" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "transactionIndex": 24, + "gasUsed": "813555", + "logsBloom": "0x000800048200000088000000040000004800400100000000100000000000000000000000000200000010000000000800000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200005000000800000008000020008000000010100000000000000000000100000000010000000000000000000000000000a0000000008000840000000000000000000004000000000400000000000000080000101000200000000001000020000000100040000000140000000000000400000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b", + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "logs": [ + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000fe19cba3ab1a189b7fc17caa798df64ad2b54d4d" + ], + "data": "0x", + "logIndex": 30, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 31, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 32, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 33, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 34, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 35, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 36, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 37, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 38, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 39, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 40, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 41, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa", + "logIndex": 42, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + } + ], + "blockNumber": 28023197, + "cumulativeGasUsed": "3578238", + "status": 1, + "byzantium": true + }, + "args": [ + "0xFe19CbA3aB1A189B7FC17cAa798Df64Ad2b54d4D", + "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "0x8129fc1c" + ], + "numDeployments": 2, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "execute": { + "methodName": "postUpgrade", + "args": [ + true, + "0x" + ] + }, + "implementation": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/celo/CarbonVortex_Implementation.json b/deployments/celo/CarbonVortex_Implementation.json new file mode 100644 index 00000000..aa3445f5 --- /dev/null +++ b/deployments/celo/CarbonVortex_Implementation.json @@ -0,0 +1,2062 @@ +{ + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICarbonController", + "name": "carbonController", + "type": "address" + }, + { + "internalType": "contract IVault", + "name": "vault", + "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" + } + ], + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "transactionIndex": 12, + "gasUsed": "5130151", + "logsBloom": "0x000800048200000088000000000000000800400100000000100000000000040000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000000000000000000000000000000000000000080000000200004000000800000008000020000000000010100000000000000000000100000000010000000000000000000000802000a0000000008000040000000000000000000004000000000400000000000000000000101000200000000000000000000000100040000000140000000000000000000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587", + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "logs": [ + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 12, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 13, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 14, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 15, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 16, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 17, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 18, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 19, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 20, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 21, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + }, + { + "transactionIndex": 12, + "blockNumber": 28024120, + "transactionHash": "0xe81dcfc41fe6fae165c052441efba76be95ae00e4da354a7d526422f95fbd809", + "address": "0x31548B11d685a358de7f52978e099e04116B2Db0", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 22, + "blockHash": "0xc27cf690a45a33866b2fdb34176e1b8e2ad5771272498d2b2d02f2aa9e647587" + } + ], + "blockNumber": 28024120, + "cumulativeGasUsed": "5608015", + "status": 1, + "byzantium": true + }, + "args": [ + "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", + "0x8cE318919438982514F9f479FDfB40D32C6ab749", + "0xE1aB22cd03377db66aeb15687E881Eab9e1a26C1", + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "0x66803FB87aBd4aaC3cbB3fAd7C3aa01f6F3FB207" + ], + "numDeployments": 3, + "solcInputHash": "617895257ad105f49fa7a2065d5c2882", + "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\":\"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\":{\"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 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 *\\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 // 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 address payable transferAddress,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(transferAddress) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\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 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 }\\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 * @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 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 // 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\":\"0x33342db24d63386b30c960c90b61c83674f6c4811bf2327c2ceaf7c2ac51bb3e\",\"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": "0x6101206040523480156200001257600080fd5b506040516200684438038062006844833981016040819052620000359162000dc8565b8262000041816200008a565b826200004d816200008a565b6001600160a01b0380881660805286811660a05285811660c05284811660e0528316610100526200007d620000b5565b5050505050505062001023565b6001600160a01b038116620000b25760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000d65750600054600160ff909116105b80620000f25750303b158015620000f2575060005460ff166001145b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200017f576000805461ff0019166101001790555b62000189620001d2565b8015620000b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200022e5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002386200024e565b62000242620002be565b6200024c62000324565b565b600054610100900460ff16620002aa5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002b462000449565b6200024c620004a5565b600054610100900460ff166200031a5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200024c62000545565b600054610100900460ff16620003805760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200038d6103e8620005a8565b6200039960026200061d565b620003a56004620006a0565b620003b261a8c06200072b565b620003bf61a8c0620007ac565b620003cd620d2f006200083f565b6200040d620003ed60e0516001600160a01b0316620008c060201b60201c565b620003fa90600a62000f9c565b6200040790606462000fb6565b62000946565b60e0516200024c90620004296001600160a01b038216620008c0565b6200043690600a62000f9c565b6200044390600a62000fb6565b62000a2e565b600054610100900460ff166200024c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600054610100900460ff16620005015760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b60c9805461ffff191660041790556200052a600080516020620068048339815191528062000ada565b6200024c600080516020620068048339815191523362000b25565b600054610100900460ff16620005a15760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600160fb55565b61012e5463ffffffff9081169082168103620005c2575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a1291015b60405180910390a15050565b61012e5463ffffffff640100000000909104811690821681036200063f575050565b61012e805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb910162000611565b61012e5463ffffffff6801000000000000000090910481169082168103620006c6575050565b61012e805463ffffffff60401b19166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1910162000611565b61012e5463ffffffff600160a01b909104811690821681036200074c575050565b61012e805463ffffffff60a01b1916600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3910162000611565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103620007d6575050565b61012e805463ffffffff60601b19166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328910162000611565b61012e5463ffffffff600160801b9091048116908216810362000860575050565b61012e805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b910162000611565b6000620008cd8262000b35565b15620008db57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000940919062000fe4565b92915050565b610133546001600160801b03908116908216810362000963575050565b61013380546001600160801b0319166001600160801b0384811691821792839055600160801b9092049091161115620009ed5760e051620009ce90620009c890620009b8906001600160a01b03163062000b5d565b6001600160801b03851662000bf9565b62000c11565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3910162000611565b6001600160a01b038216600090815261013260205260409020546001600160801b03908116908216810362000a6257505050565b6001600160a01b0383166000818152610132602090815260409182902080546001600160801b0319166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910160405180910390a2505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000b31828262000c80565b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1462000940565b600062000b6a8362000b35565b1562000b8257506001600160a01b0381163162000940565b826040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801562000bcc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf2919062001009565b9392505050565b600081831062000c0a578162000bf2565b5090919050565b60006001600160801b0382111562000c7c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b606482015260840162000152565b5090565b62000c8c828262000cab565b600082815260976020526040902062000ca6908262000d4f565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1662000b315760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000d0b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000bf2836001600160a01b038416600081815260018301602052604081205462000da95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000940565b50600062000940565b6001600160a01b0381168114620000b257600080fd5b600080600080600060a0868803121562000de157600080fd5b855162000dee8162000db2565b602087015190955062000e018162000db2565b604087015190945062000e148162000db2565b606087015190935062000e278162000db2565b608087015190925062000e3a8162000db2565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ea5576001600160801b0382900482111562000e895762000e8962000e48565b8085161562000e9757918102915b93841c939080029062000e63565b509250929050565b60008262000ebe5750600162000940565b8162000ecd5750600062000940565b816001811462000ee6576002811462000ef15762000f2c565b600191505062000940565b60ff84111562000f055762000f0562000e48565b6001841b91506001600160801b0382111562000f255762000f2562000e48565b5062000940565b5060208310610133831016604e8410600b841016171562000f6b575081810a6001600160801b0381111562000f655762000f6562000e48565b62000940565b62000f77838362000e5e565b6001600160801b0381900482111562000f945762000f9462000e48565b029392505050565b600062000bf260ff84166001600160801b03841662000ead565b6001600160801b0381811683821602808216919082811462000fdc5762000fdc62000e48565b505092915050565b60006020828403121562000ff757600080fd5b815160ff8116811462000bf257600080fd5b6000602082840312156200101c57600080fd5b5051919050565b60805160a05160c05160e0516101005161565a620011aa600039600081816104d601528181610f1301528181610fec0152818161301501528181613118015281816131b001528181613687015261377a0152600081816103f00152818161091801528181610fb5015281816110250152818161153301528181611ad201528181611c1e015281816122f1015281816123a001528181612462015281816124d70152818161255401528181612af001528181612f550152818161317601528181613285015281816132ea01528181613335015281816133960152818161341601528181613525015281816135a901528181613637015281816136c0015281816137b10152818161381c0152818161386401528181613f1201528181613f5f0152613f830152600081816110470152818161309f0152818161313b01526136e2015260008181610c5401528181610d8b01528181610df701528181611703015261173f015260008181610c2e01528181610cfa015281816116240152611689015261565a6000f3fe6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160048152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506004848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660041790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + "deployedBytecode": "0x6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160048152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506004848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660041790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a", + "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 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 + }, + "storageLayout": { + "storage": [ + { + "astId": 585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 588, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1318, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1591, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 479, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 33, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roleMembers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)" + }, + { + "astId": 143, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializations", + "offset": 0, + "slot": "201", + "type": "t_uint16" + }, + { + "astId": 12184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 761, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 830, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12536, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_totalCollected", + "offset": 0, + "slot": "301", + "type": "t_uint256" + }, + { + "astId": 12538, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_rewardsPPM", + "offset": 0, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12540, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceResetMultiplier", + "offset": 4, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12542, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmountMultiplier", + "offset": 8, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12544, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLife", + "offset": 12, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12546, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLifeOnReset", + "offset": 16, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12548, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceDecayHalfLife", + "offset": 20, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12553, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_disabledPairs", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_bool)" + }, + { + "astId": 12558, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_tradingStartTimes", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)" + }, + { + "astId": 12564, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialPrice", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)" + }, + { + "astId": 12569, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmounts", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)" + }, + { + "astId": 12572, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenSaleAmount", + "offset": 0, + "slot": "307", + "type": "t_struct(SaleAmount)14811_storage" + }, + { + "astId": 12578, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "308", + "type": "t_array(t_uint256)43_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)43_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[43]", + "numberOfBytes": "1376" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)2901_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_bool)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => struct ICarbonVortex.Price)", + "numberOfBytes": "32", + "value": "t_struct(Price)14806_storage" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint128)", + "numberOfBytes": "32", + "value": "t_uint128" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_struct(AddressSet)2901_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 2900, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)2586_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Price)14806_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.Price", + "members": [ + { + "astId": 14803, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "sourceAmount", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14805, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "targetAmount", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SaleAmount)14811_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.SaleAmount", + "members": [ + { + "astId": 14808, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "initial", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14810, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "current", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)2586_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 2581, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 2585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_userDefinedValueType(Token)10748": { + "encoding": "inplace", + "label": "Token", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/celo/CarbonVortex_Proxy.json b/deployments/celo/CarbonVortex_Proxy.json new file mode 100644 index 00000000..bf7905c7 --- /dev/null +++ b/deployments/celo/CarbonVortex_Proxy.json @@ -0,0 +1,369 @@ +{ + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "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" + } + ], + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "transactionIndex": 24, + "gasUsed": "813555", + "logsBloom": "0x000800048200000088000000040000004800400100000000100000000000000000000000000200000010000000000800000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200005000000800000008000020008000000010100000000000000000000100000000010000000000000000000000000000a0000000008000840000000000000000000004000000000400000000000000080000101000200000000001000020000000100040000000140000000000000400000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b", + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "logs": [ + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000fe19cba3ab1a189b7fc17caa798df64ad2b54d4d" + ], + "data": "0x", + "logIndex": 30, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 31, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 32, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 33, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 34, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 35, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 36, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 37, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 38, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 39, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 40, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 41, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + }, + { + "transactionIndex": 24, + "blockNumber": 28023197, + "transactionHash": "0xb27dfd66507c42836a0c4c779f2ff141685f6ceda8ef01a64fda6bfda8bb04a3", + "address": "0xa15E3295465439A361dBcac79C1DBCE6Cd01E562", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa", + "logIndex": 42, + "blockHash": "0xb6dbbb48f186290fee90a200e623534dd69dbee6960d44a1227a1553e3618f7b" + } + ], + "blockNumber": 28023197, + "cumulativeGasUsed": "3578238", + "status": 1, + "byzantium": true + }, + "args": [ + "0xFe19CbA3aB1A189B7FC17cAa798Df64Ad2b54d4D", + "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fantom/.chainId b/deployments/fantom/.chainId new file mode 100644 index 00000000..cb1a40df --- /dev/null +++ b/deployments/fantom/.chainId @@ -0,0 +1 @@ +250 diff --git a/deployments/fantom/.migrations.json b/deployments/fantom/.migrations.json new file mode 100644 index 00000000..666fc20a --- /dev/null +++ b/deployments/fantom/.migrations.json @@ -0,0 +1,5 @@ +{ + "0001-ProxyAdmin": 1727427129, + "0002-CarbonVortex": 1727427144, + "0003-CarbonVortex-upgrade": 1727705491 +} \ No newline at end of file diff --git a/deployments/fantom/CarbonVortex.json b/deployments/fantom/CarbonVortex.json new file mode 100644 index 00000000..89f2fab6 --- /dev/null +++ b/deployments/fantom/CarbonVortex.json @@ -0,0 +1,1595 @@ +{ + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "abi": [ + { + "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" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "transactionIndex": 0, + "gasUsed": "813555", + "logsBloom": "0x000800048200000088000000000000004800400100004000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200004000000800000008000020008000000010100000000000000000000100000000010000000000000040000000000000a0000000008000840000000000000008000004000000000400000000000000000000101000200000000000000020000000100040000000140000000000000400000120200000040020000000010000000000000000000020000080000000000000000000000010002000", + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d", + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000094a63aa724c3ca73d4c6abc06a794373b9375a83" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001388", + "logIndex": 3, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 4, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 5, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 7, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 8, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 9, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 10, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 11, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000759db9cd657e627238fb8e846b2f9805485d2352", + "logIndex": 12, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + } + ], + "blockNumber": 92809587, + "cumulativeGasUsed": "813555", + "status": 1, + "byzantium": true + }, + "args": [ + "0x94a63aA724C3ca73d4c6AbC06A794373b9375a83", + "0x759dB9cd657E627238Fb8E846B2f9805485D2352", + "0x8129fc1c" + ], + "numDeployments": 2, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "execute": { + "methodName": "postUpgrade", + "args": [ + true, + "0x" + ] + }, + "implementation": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fantom/CarbonVortex_Implementation.json b/deployments/fantom/CarbonVortex_Implementation.json new file mode 100644 index 00000000..e4489bd6 --- /dev/null +++ b/deployments/fantom/CarbonVortex_Implementation.json @@ -0,0 +1,2062 @@ +{ + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICarbonController", + "name": "carbonController", + "type": "address" + }, + { + "internalType": "contract IVault", + "name": "vault", + "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" + } + ], + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "transactionIndex": 0, + "gasUsed": "5129911", + "logsBloom": "0x000800048200000088000000000000000800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000040000000204000000000000000000000000000000000000000080000000200004000000800000008000020000000000010100000000000000000000100000000010000000000000000000000000000a0000000008000040000000000000000000004000000000400000000000000000004101000200000000000000000000000100040800000140000000000000000000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb", + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 2, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 3, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 4, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 5, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 7, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 8, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 9, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + }, + { + "transactionIndex": 0, + "blockNumber": 93131981, + "transactionHash": "0x0d4c59b68b6649b977d1ac01ca59d3cdcb6432824ae8a63a1cca1745b2cad9b0", + "address": "0xD0B82E96cBa38CDa95DE4943a771E832bF3Bb921", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 10, + "blockHash": "0x0004b4790000018a5b6a0673ca4a8df5ff94c7884b8f40485cc70df6f1ad3ffb" + } + ], + "blockNumber": 93131981, + "cumulativeGasUsed": "5129911", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x4E017822E77e34842b71b8A24b09e6E490FACA13", + "0xE1aB22cd03377db66aeb15687E881Eab9e1a26C1", + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "0x695921034f0387eAc4e11620EE91b1b15A6A09fE" + ], + "numDeployments": 2, + "solcInputHash": "617895257ad105f49fa7a2065d5c2882", + "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\":\"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\":{\"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 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 *\\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 // 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 address payable transferAddress,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(transferAddress) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\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 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 }\\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 * @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 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 // 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\":\"0x33342db24d63386b30c960c90b61c83674f6c4811bf2327c2ceaf7c2ac51bb3e\",\"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": "0x6101206040523480156200001257600080fd5b506040516200684438038062006844833981016040819052620000359162000dc8565b8262000041816200008a565b826200004d816200008a565b6001600160a01b0380881660805286811660a05285811660c05284811660e0528316610100526200007d620000b5565b5050505050505062001023565b6001600160a01b038116620000b25760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000d65750600054600160ff909116105b80620000f25750303b158015620000f2575060005460ff166001145b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200017f576000805461ff0019166101001790555b62000189620001d2565b8015620000b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200022e5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002386200024e565b62000242620002be565b6200024c62000324565b565b600054610100900460ff16620002aa5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002b462000449565b6200024c620004a5565b600054610100900460ff166200031a5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200024c62000545565b600054610100900460ff16620003805760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200038d6103e8620005a8565b6200039960026200061d565b620003a56004620006a0565b620003b261a8c06200072b565b620003bf61a8c0620007ac565b620003cd620d2f006200083f565b6200040d620003ed60e0516001600160a01b0316620008c060201b60201c565b620003fa90600a62000f9c565b6200040790606462000fb6565b62000946565b60e0516200024c90620004296001600160a01b038216620008c0565b6200043690600a62000f9c565b6200044390600a62000fb6565b62000a2e565b600054610100900460ff166200024c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600054610100900460ff16620005015760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b60c9805461ffff191660041790556200052a600080516020620068048339815191528062000ada565b6200024c600080516020620068048339815191523362000b25565b600054610100900460ff16620005a15760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600160fb55565b61012e5463ffffffff9081169082168103620005c2575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a1291015b60405180910390a15050565b61012e5463ffffffff640100000000909104811690821681036200063f575050565b61012e805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb910162000611565b61012e5463ffffffff6801000000000000000090910481169082168103620006c6575050565b61012e805463ffffffff60401b19166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1910162000611565b61012e5463ffffffff600160a01b909104811690821681036200074c575050565b61012e805463ffffffff60a01b1916600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3910162000611565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103620007d6575050565b61012e805463ffffffff60601b19166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328910162000611565b61012e5463ffffffff600160801b9091048116908216810362000860575050565b61012e805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b910162000611565b6000620008cd8262000b35565b15620008db57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000940919062000fe4565b92915050565b610133546001600160801b03908116908216810362000963575050565b61013380546001600160801b0319166001600160801b0384811691821792839055600160801b9092049091161115620009ed5760e051620009ce90620009c890620009b8906001600160a01b03163062000b5d565b6001600160801b03851662000bf9565b62000c11565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3910162000611565b6001600160a01b038216600090815261013260205260409020546001600160801b03908116908216810362000a6257505050565b6001600160a01b0383166000818152610132602090815260409182902080546001600160801b0319166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910160405180910390a2505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000b31828262000c80565b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1462000940565b600062000b6a8362000b35565b1562000b8257506001600160a01b0381163162000940565b826040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801562000bcc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf2919062001009565b9392505050565b600081831062000c0a578162000bf2565b5090919050565b60006001600160801b0382111562000c7c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b606482015260840162000152565b5090565b62000c8c828262000cab565b600082815260976020526040902062000ca6908262000d4f565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1662000b315760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000d0b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000bf2836001600160a01b038416600081815260018301602052604081205462000da95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000940565b50600062000940565b6001600160a01b0381168114620000b257600080fd5b600080600080600060a0868803121562000de157600080fd5b855162000dee8162000db2565b602087015190955062000e018162000db2565b604087015190945062000e148162000db2565b606087015190935062000e278162000db2565b608087015190925062000e3a8162000db2565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ea5576001600160801b0382900482111562000e895762000e8962000e48565b8085161562000e9757918102915b93841c939080029062000e63565b509250929050565b60008262000ebe5750600162000940565b8162000ecd5750600062000940565b816001811462000ee6576002811462000ef15762000f2c565b600191505062000940565b60ff84111562000f055762000f0562000e48565b6001841b91506001600160801b0382111562000f255762000f2562000e48565b5062000940565b5060208310610133831016604e8410600b841016171562000f6b575081810a6001600160801b0381111562000f655762000f6562000e48565b62000940565b62000f77838362000e5e565b6001600160801b0381900482111562000f945762000f9462000e48565b029392505050565b600062000bf260ff84166001600160801b03841662000ead565b6001600160801b0381811683821602808216919082811462000fdc5762000fdc62000e48565b505092915050565b60006020828403121562000ff757600080fd5b815160ff8116811462000bf257600080fd5b6000602082840312156200101c57600080fd5b5051919050565b60805160a05160c05160e0516101005161565a620011aa600039600081816104d601528181610f1301528181610fec0152818161301501528181613118015281816131b001528181613687015261377a0152600081816103f00152818161091801528181610fb5015281816110250152818161153301528181611ad201528181611c1e015281816122f1015281816123a001528181612462015281816124d70152818161255401528181612af001528181612f550152818161317601528181613285015281816132ea01528181613335015281816133960152818161341601528181613525015281816135a901528181613637015281816136c0015281816137b10152818161381c0152818161386401528181613f1201528181613f5f0152613f830152600081816110470152818161309f0152818161313b01526136e2015260008181610c5401528181610d8b01528181610df701528181611703015261173f015260008181610c2e01528181610cfa015281816116240152611689015261565a6000f3fe6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160048152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506004848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660041790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + "deployedBytecode": "0x6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160048152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506004848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660041790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a", + "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 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 + }, + "storageLayout": { + "storage": [ + { + "astId": 585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 588, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1318, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1591, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 479, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 33, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roleMembers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)" + }, + { + "astId": 143, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializations", + "offset": 0, + "slot": "201", + "type": "t_uint16" + }, + { + "astId": 12184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 761, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 830, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12536, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_totalCollected", + "offset": 0, + "slot": "301", + "type": "t_uint256" + }, + { + "astId": 12538, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_rewardsPPM", + "offset": 0, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12540, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceResetMultiplier", + "offset": 4, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12542, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmountMultiplier", + "offset": 8, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12544, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLife", + "offset": 12, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12546, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLifeOnReset", + "offset": 16, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12548, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceDecayHalfLife", + "offset": 20, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12553, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_disabledPairs", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_bool)" + }, + { + "astId": 12558, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_tradingStartTimes", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)" + }, + { + "astId": 12564, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialPrice", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)" + }, + { + "astId": 12569, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmounts", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)" + }, + { + "astId": 12572, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenSaleAmount", + "offset": 0, + "slot": "307", + "type": "t_struct(SaleAmount)14811_storage" + }, + { + "astId": 12578, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "308", + "type": "t_array(t_uint256)43_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)43_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[43]", + "numberOfBytes": "1376" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)2901_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_bool)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => struct ICarbonVortex.Price)", + "numberOfBytes": "32", + "value": "t_struct(Price)14806_storage" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint128)", + "numberOfBytes": "32", + "value": "t_uint128" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_struct(AddressSet)2901_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 2900, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)2586_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Price)14806_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.Price", + "members": [ + { + "astId": 14803, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "sourceAmount", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14805, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "targetAmount", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SaleAmount)14811_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.SaleAmount", + "members": [ + { + "astId": 14808, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "initial", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14810, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "current", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)2586_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 2581, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 2585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_userDefinedValueType(Token)10748": { + "encoding": "inplace", + "label": "Token", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/fantom/CarbonVortex_Proxy.json b/deployments/fantom/CarbonVortex_Proxy.json new file mode 100644 index 00000000..4ea3914b --- /dev/null +++ b/deployments/fantom/CarbonVortex_Proxy.json @@ -0,0 +1,369 @@ +{ + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "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" + } + ], + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "transactionIndex": 0, + "gasUsed": "813555", + "logsBloom": "0x000800048200000088000000000000004800400100004000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200004000000800000008000020008000000010100000000000000000000100000000010000000000000040000000000000a0000000008000840000000000000008000004000000000400000000000000000000101000200000000000000020000000100040000000140000000000000400000120200000040020000000010000000000000000000020000080000000000000000000000010002000", + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d", + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000094a63aa724c3ca73d4c6abc06a794373b9375a83" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001388", + "logIndex": 3, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 4, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 5, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 7, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 8, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 9, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 10, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 11, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + }, + { + "transactionIndex": 0, + "blockNumber": 92809587, + "transactionHash": "0x340d451f411cb3a3aba94b50c32df75644c7c036a52acca64ee4fe9de1e07c2d", + "address": "0x4A0c4eF72e0BA9d6A2d34dAD6E794378d9Ad4130", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000759db9cd657e627238fb8e846b2f9805485d2352", + "logIndex": 12, + "blockHash": "0x0004b21100000deabfca601843930e41fc9419601ebf136551af24522ce8c26d" + } + ], + "blockNumber": 92809587, + "cumulativeGasUsed": "813555", + "status": 1, + "byzantium": true + }, + "args": [ + "0x94a63aA724C3ca73d4c6AbC06A794373b9375a83", + "0x759dB9cd657E627238Fb8E846B2f9805485D2352", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fantom/ProxyAdmin.json b/deployments/fantom/ProxyAdmin.json new file mode 100644 index 00000000..8daf5190 --- /dev/null +++ b/deployments/fantom/ProxyAdmin.json @@ -0,0 +1,246 @@ +{ + "address": "0x759dB9cd657E627238Fb8E846B2f9805485D2352", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xecd0422a5913127566cff9642ec8590a923f903c9f47737374990ceb39008030", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x759dB9cd657E627238Fb8E846B2f9805485D2352", + "transactionIndex": 0, + "gasUsed": "483623", + "logsBloom": "0x00000000820000000000000000000000000000000000000000800000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000400000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000010000000000000000000000000000000000000000000000000000", + "blockHash": "0x0004b21100000ccaaa027b953e47188fdb27b271c0832f9c1ea0d6a6854761fa", + "transactionHash": "0xecd0422a5913127566cff9642ec8590a923f903c9f47737374990ceb39008030", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 92809574, + "transactionHash": "0xecd0422a5913127566cff9642ec8590a923f903c9f47737374990ceb39008030", + "address": "0x759dB9cd657E627238Fb8E846B2f9805485D2352", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x0004b21100000ccaaa027b953e47188fdb27b271c0832f9c1ea0d6a6854761fa" + } + ], + "blockNumber": 92809574, + "cumulativeGasUsed": "483623", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\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\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 Returns the current admin.\\n */\\n function _getAdmin() internal view 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 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(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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\"},\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\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 *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\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(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(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 * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\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 _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\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 _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\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 function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"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/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "devdoc": { + "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", + "kind": "dev", + "methods": { + "changeProxyAdmin(address,address)": { + "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." + }, + "getProxyAdmin(address)": { + "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "getProxyImplementation(address)": { + "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgrade(address,address)": { + "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." + }, + "upgradeAndCall(address,address,bytes)": { + "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4735, + "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/linea/.chainId b/deployments/linea/.chainId new file mode 100644 index 00000000..5158ec8d --- /dev/null +++ b/deployments/linea/.chainId @@ -0,0 +1 @@ +59144 diff --git a/deployments/linea/.migrations.json b/deployments/linea/.migrations.json new file mode 100644 index 00000000..1cddbedc --- /dev/null +++ b/deployments/linea/.migrations.json @@ -0,0 +1,4 @@ +{ + "0001-ProxyAdmin": 1727793649, + "0002-CarbonVortex": 1727793666 +} \ No newline at end of file diff --git a/deployments/linea/CarbonVortex.json b/deployments/linea/CarbonVortex.json new file mode 100644 index 00000000..b1da2cb6 --- /dev/null +++ b/deployments/linea/CarbonVortex.json @@ -0,0 +1,1592 @@ +{ + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "abi": [ + { + "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" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "transactionIndex": 2, + "gasUsed": "813555", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080008000200005000000800000008000020008000000010100000800000000000000100000000010000000000002000000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000201004000000000020000000100040000000140000000000000400000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c", + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 3, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 4, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 5, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 7, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 8, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 9, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 10, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 11, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000059f21012b2e9ba67ce6a7605e74f945d0d4c84ea", + "logIndex": 12, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + } + ], + "blockNumber": 10184518, + "cumulativeGasUsed": "1060146", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/linea/CarbonVortex_Implementation.json b/deployments/linea/CarbonVortex_Implementation.json new file mode 100644 index 00000000..5a0f975d --- /dev/null +++ b/deployments/linea/CarbonVortex_Implementation.json @@ -0,0 +1,2062 @@ +{ + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICarbonController", + "name": "carbonController", + "type": "address" + }, + { + "internalType": "contract IVault", + "name": "vault", + "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" + } + ], + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "transactionIndex": 4, + "gasUsed": "5129671", + "logsBloom": "0x000800048200000088000000000000000800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000000000000000000000000000000000000000080000000200004020200800000008000020000000000010100000000000000000000100000000010000000000000000000000000000a0000000008000040000000000000000000004000000000400000000000000000000101000200000000000000000000000100040000000140000000000000000000120200000040020000000010040000000000000000000000080000000000000000000000000000000", + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2", + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 15, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 16, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 17, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 18, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 19, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 20, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 21, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 22, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 23, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 24, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + }, + { + "transactionIndex": 4, + "blockNumber": 10184514, + "transactionHash": "0x05cd169289cef4b2db6c530f9507edc3a389d51cd65e0bed1c47126f0c39bb70", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 25, + "blockHash": "0xa0106eaa7b339bb159880080b0fbd65c57222324046f7dfe767970e118d092c2" + } + ], + "blockNumber": 10184514, + "cumulativeGasUsed": "5904082", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", + "0xE1aB22cd03377db66aeb15687E881Eab9e1a26C1", + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "0x0000000000000000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "7c1f6a32868c060ab88825316a91cddf", + "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\":\"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\":{\"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 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 *\\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 // 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 address payable transferAddress,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(transferAddress) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\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 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 }\\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 3;\\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 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 // 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\":\"0xb2d6cc49ecdc95d58e6047a367f22305082e24d89cbdada6a318f351a42bca90\",\"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": "0x6101206040523480156200001257600080fd5b506040516200684438038062006844833981016040819052620000359162000dc8565b8262000041816200008a565b826200004d816200008a565b6001600160a01b0380881660805286811660a05285811660c05284811660e0528316610100526200007d620000b5565b5050505050505062001023565b6001600160a01b038116620000b25760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000d65750600054600160ff909116105b80620000f25750303b158015620000f2575060005460ff166001145b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200017f576000805461ff0019166101001790555b62000189620001d2565b8015620000b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200022e5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002386200024e565b62000242620002be565b6200024c62000324565b565b600054610100900460ff16620002aa5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002b462000449565b6200024c620004a5565b600054610100900460ff166200031a5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200024c62000545565b600054610100900460ff16620003805760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200038d6103e8620005a8565b6200039960026200061d565b620003a56004620006a0565b620003b261a8c06200072b565b620003bf61a8c0620007ac565b620003cd620d2f006200083f565b6200040d620003ed60e0516001600160a01b0316620008c060201b60201c565b620003fa90600a62000f9c565b6200040790606462000fb6565b62000946565b60e0516200024c90620004296001600160a01b038216620008c0565b6200043690600a62000f9c565b6200044390600a62000fb6565b62000a2e565b600054610100900460ff166200024c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600054610100900460ff16620005015760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b60c9805461ffff191660031790556200052a600080516020620068048339815191528062000ada565b6200024c600080516020620068048339815191523362000b25565b600054610100900460ff16620005a15760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600160fb55565b61012e5463ffffffff9081169082168103620005c2575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a1291015b60405180910390a15050565b61012e5463ffffffff640100000000909104811690821681036200063f575050565b61012e805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb910162000611565b61012e5463ffffffff6801000000000000000090910481169082168103620006c6575050565b61012e805463ffffffff60401b19166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1910162000611565b61012e5463ffffffff600160a01b909104811690821681036200074c575050565b61012e805463ffffffff60a01b1916600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3910162000611565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103620007d6575050565b61012e805463ffffffff60601b19166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328910162000611565b61012e5463ffffffff600160801b9091048116908216810362000860575050565b61012e805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b910162000611565b6000620008cd8262000b35565b15620008db57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000940919062000fe4565b92915050565b610133546001600160801b03908116908216810362000963575050565b61013380546001600160801b0319166001600160801b0384811691821792839055600160801b9092049091161115620009ed5760e051620009ce90620009c890620009b8906001600160a01b03163062000b5d565b6001600160801b03851662000bf9565b62000c11565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3910162000611565b6001600160a01b038216600090815261013260205260409020546001600160801b03908116908216810362000a6257505050565b6001600160a01b0383166000818152610132602090815260409182902080546001600160801b0319166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910160405180910390a2505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000b31828262000c80565b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1462000940565b600062000b6a8362000b35565b1562000b8257506001600160a01b0381163162000940565b826040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801562000bcc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf2919062001009565b9392505050565b600081831062000c0a578162000bf2565b5090919050565b60006001600160801b0382111562000c7c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b606482015260840162000152565b5090565b62000c8c828262000cab565b600082815260976020526040902062000ca6908262000d4f565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1662000b315760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000d0b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000bf2836001600160a01b038416600081815260018301602052604081205462000da95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000940565b50600062000940565b6001600160a01b0381168114620000b257600080fd5b600080600080600060a0868803121562000de157600080fd5b855162000dee8162000db2565b602087015190955062000e018162000db2565b604087015190945062000e148162000db2565b606087015190935062000e278162000db2565b608087015190925062000e3a8162000db2565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ea5576001600160801b0382900482111562000e895762000e8962000e48565b8085161562000e9757918102915b93841c939080029062000e63565b509250929050565b60008262000ebe5750600162000940565b8162000ecd5750600062000940565b816001811462000ee6576002811462000ef15762000f2c565b600191505062000940565b60ff84111562000f055762000f0562000e48565b6001841b91506001600160801b0382111562000f255762000f2562000e48565b5062000940565b5060208310610133831016604e8410600b841016171562000f6b575081810a6001600160801b0381111562000f655762000f6562000e48565b62000940565b62000f77838362000e5e565b6001600160801b0381900482111562000f945762000f9462000e48565b029392505050565b600062000bf260ff84166001600160801b03841662000ead565b6001600160801b0381811683821602808216919082811462000fdc5762000fdc62000e48565b505092915050565b60006020828403121562000ff757600080fd5b815160ff8116811462000bf257600080fd5b6000602082840312156200101c57600080fd5b5051919050565b60805160a05160c05160e0516101005161565a620011aa600039600081816104d601528181610f1301528181610fec0152818161301501528181613118015281816131b001528181613687015261377a0152600081816103f00152818161091801528181610fb5015281816110250152818161153301528181611ad201528181611c1e015281816122f1015281816123a001528181612462015281816124d70152818161255401528181612af001528181612f550152818161317601528181613285015281816132ea01528181613335015281816133960152818161341601528181613525015281816135a901528181613637015281816136c0015281816137b10152818161381c0152818161386401528181613f1201528181613f5f0152613f830152600081816110470152818161309f0152818161313b01526136e2015260008181610c5401528181610d8b01528181610df701528181611703015261173f015260008181610c2e01528181610cfa015281816116240152611689015261565a6000f3fe6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + "deployedBytecode": "0x6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a", + "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 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 + }, + "storageLayout": { + "storage": [ + { + "astId": 585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 588, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1318, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1591, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 479, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 33, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roleMembers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)" + }, + { + "astId": 143, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializations", + "offset": 0, + "slot": "201", + "type": "t_uint16" + }, + { + "astId": 12184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 761, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 830, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12536, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_totalCollected", + "offset": 0, + "slot": "301", + "type": "t_uint256" + }, + { + "astId": 12538, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_rewardsPPM", + "offset": 0, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12540, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceResetMultiplier", + "offset": 4, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12542, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmountMultiplier", + "offset": 8, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12544, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLife", + "offset": 12, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12546, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLifeOnReset", + "offset": 16, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12548, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceDecayHalfLife", + "offset": 20, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12553, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_disabledPairs", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_bool)" + }, + { + "astId": 12558, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_tradingStartTimes", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)" + }, + { + "astId": 12564, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialPrice", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)" + }, + { + "astId": 12569, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmounts", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)" + }, + { + "astId": 12572, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenSaleAmount", + "offset": 0, + "slot": "307", + "type": "t_struct(SaleAmount)14811_storage" + }, + { + "astId": 12578, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "308", + "type": "t_array(t_uint256)43_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)43_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[43]", + "numberOfBytes": "1376" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)2901_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_bool)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => struct ICarbonVortex.Price)", + "numberOfBytes": "32", + "value": "t_struct(Price)14806_storage" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint128)", + "numberOfBytes": "32", + "value": "t_uint128" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_struct(AddressSet)2901_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 2900, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)2586_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Price)14806_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.Price", + "members": [ + { + "astId": 14803, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "sourceAmount", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14805, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "targetAmount", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SaleAmount)14811_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.SaleAmount", + "members": [ + { + "astId": 14808, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "initial", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14810, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "current", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)2586_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 2581, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 2585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_userDefinedValueType(Token)10748": { + "encoding": "inplace", + "label": "Token", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/linea/CarbonVortex_Proxy.json b/deployments/linea/CarbonVortex_Proxy.json new file mode 100644 index 00000000..908c0e7f --- /dev/null +++ b/deployments/linea/CarbonVortex_Proxy.json @@ -0,0 +1,369 @@ +{ + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "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" + } + ], + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "transactionIndex": 2, + "gasUsed": "813555", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080008000200005000000800000008000020008000000010100000800000000000000100000000010000000000002000000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000201004000000000020000000100040000000140000000000000400000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c", + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 3, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 4, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 5, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 7, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 8, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 9, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 10, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 11, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + }, + { + "transactionIndex": 2, + "blockNumber": 10184518, + "transactionHash": "0x85b7bd18622ca25e01a48752a18b72c923f554697c55ba6ba2ec38ef30635481", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000059f21012b2e9ba67ce6a7605e74f945d0d4c84ea", + "logIndex": 12, + "blockHash": "0x2a1ea6a10ac2ddfbfedee2c0fdf43b9c530a215a8ff6e5d1a6a22234b30b9b2c" + } + ], + "blockNumber": 10184518, + "cumulativeGasUsed": "1060146", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/linea/ProxyAdmin.json b/deployments/linea/ProxyAdmin.json new file mode 100644 index 00000000..85ca9ec4 --- /dev/null +++ b/deployments/linea/ProxyAdmin.json @@ -0,0 +1,246 @@ +{ + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x121ef159395ec3ed93119d50900b9b0ae5dc40fe77e1931fecd4f8979badad82", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "transactionIndex": 0, + "gasUsed": "483623", + "logsBloom": "0x00000000820000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000", + "blockHash": "0xa8547dc6f1011e64c3e00db0eb041de5031b304f07b48a6cd7d6275e8b5ce98b", + "transactionHash": "0x121ef159395ec3ed93119d50900b9b0ae5dc40fe77e1931fecd4f8979badad82", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 10184510, + "transactionHash": "0x121ef159395ec3ed93119d50900b9b0ae5dc40fe77e1931fecd4f8979badad82", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xa8547dc6f1011e64c3e00db0eb041de5031b304f07b48a6cd7d6275e8b5ce98b" + } + ], + "blockNumber": 10184510, + "cumulativeGasUsed": "483623", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\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\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 Returns the current admin.\\n */\\n function _getAdmin() internal view 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 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(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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\"},\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\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 *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\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(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(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 * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\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 _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\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 _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\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 function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"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/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "devdoc": { + "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", + "kind": "dev", + "methods": { + "changeProxyAdmin(address,address)": { + "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." + }, + "getProxyAdmin(address)": { + "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "getProxyImplementation(address)": { + "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgrade(address,address)": { + "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." + }, + "upgradeAndCall(address,address,bytes)": { + "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4735, + "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/mantle/.chainId b/deployments/mantle/.chainId new file mode 100644 index 00000000..e9c02dad --- /dev/null +++ b/deployments/mantle/.chainId @@ -0,0 +1 @@ +5000 diff --git a/deployments/mantle/.migrations.json b/deployments/mantle/.migrations.json new file mode 100644 index 00000000..28d93374 --- /dev/null +++ b/deployments/mantle/.migrations.json @@ -0,0 +1,4 @@ +{ + "0001-ProxyAdmin": 1727788795, + "0002-CarbonVortex": 1727788819 +} \ No newline at end of file diff --git a/deployments/mantle/CarbonVortex.json b/deployments/mantle/CarbonVortex.json new file mode 100644 index 00000000..844a4622 --- /dev/null +++ b/deployments/mantle/CarbonVortex.json @@ -0,0 +1,1592 @@ +{ + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "abi": [ + { + "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" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "transactionIndex": 3, + "gasUsed": "5132177179", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200004000000800000008008020008000000010100000000000000000000100000000010000000000000000000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000200000000000000120000000100040001001140000000000000400000120200000040020000000010000000000040000000000000080000000000000000000000000001000", + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7", + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000008c05ea305235a67c7095a32ad4a2ee2688ade636" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 10, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 11, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 12, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 13, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 14, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 15, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 16, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 17, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 18, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4816658ad10bf215053c533cceae3f59e1f1087", + "logIndex": 19, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + } + ], + "blockNumber": 69829248, + "cumulativeGasUsed": "8373119480", + "status": 1, + "byzantium": true + }, + "args": [ + "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "0xe4816658ad10bF215053C533cceAe3f59e1f1087", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mantle/CarbonVortex_Implementation.json b/deployments/mantle/CarbonVortex_Implementation.json new file mode 100644 index 00000000..4c346019 --- /dev/null +++ b/deployments/mantle/CarbonVortex_Implementation.json @@ -0,0 +1,2062 @@ +{ + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICarbonController", + "name": "carbonController", + "type": "address" + }, + { + "internalType": "contract IVault", + "name": "vault", + "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" + } + ], + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "transactionIndex": 3, + "gasUsed": "33893639093", + "logsBloom": "0x000800048200000088000000000000000800400100000000100000000000000000000000000200000000000000000000000000000008000000100002000000000000000000000000000000204000000000000000000000000000000000000000080000000200004000000800000008000020000000000010100000000000000000000100000000010000000000000000000000000000a0000000008000040000000000000000000004000000000400000000000000000000101000200004000000000000000000100040000000140000000000000040000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132", + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 5, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 6, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 7, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 8, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 9, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 10, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 11, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 12, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + }, + { + "transactionIndex": 3, + "blockNumber": 69829244, + "transactionHash": "0xf02be81d8c8cadfe0d517d39ccb66eadca47dda8f4325ed71313189463dcf332", + "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 13, + "blockHash": "0x0a7e1808deb80c3b137dba5327468886853fc628a13fd387dad3d260d2b65132" + } + ], + "blockNumber": 69829244, + "cumulativeGasUsed": "35210252259", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", + "0xE1aB22cd03377db66aeb15687E881Eab9e1a26C1", + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111" + ], + "numDeployments": 1, + "solcInputHash": "7c1f6a32868c060ab88825316a91cddf", + "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\":\"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\":{\"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 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 *\\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 // 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 address payable transferAddress,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(transferAddress) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\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 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 }\\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 3;\\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 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 // 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\":\"0xb2d6cc49ecdc95d58e6047a367f22305082e24d89cbdada6a318f351a42bca90\",\"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": "0x6101206040523480156200001257600080fd5b506040516200684438038062006844833981016040819052620000359162000dc8565b8262000041816200008a565b826200004d816200008a565b6001600160a01b0380881660805286811660a05285811660c05284811660e0528316610100526200007d620000b5565b5050505050505062001023565b6001600160a01b038116620000b25760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000d65750600054600160ff909116105b80620000f25750303b158015620000f2575060005460ff166001145b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200017f576000805461ff0019166101001790555b62000189620001d2565b8015620000b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200022e5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002386200024e565b62000242620002be565b6200024c62000324565b565b600054610100900460ff16620002aa5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002b462000449565b6200024c620004a5565b600054610100900460ff166200031a5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200024c62000545565b600054610100900460ff16620003805760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200038d6103e8620005a8565b6200039960026200061d565b620003a56004620006a0565b620003b261a8c06200072b565b620003bf61a8c0620007ac565b620003cd620d2f006200083f565b6200040d620003ed60e0516001600160a01b0316620008c060201b60201c565b620003fa90600a62000f9c565b6200040790606462000fb6565b62000946565b60e0516200024c90620004296001600160a01b038216620008c0565b6200043690600a62000f9c565b6200044390600a62000fb6565b62000a2e565b600054610100900460ff166200024c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600054610100900460ff16620005015760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b60c9805461ffff191660031790556200052a600080516020620068048339815191528062000ada565b6200024c600080516020620068048339815191523362000b25565b600054610100900460ff16620005a15760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600160fb55565b61012e5463ffffffff9081169082168103620005c2575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a1291015b60405180910390a15050565b61012e5463ffffffff640100000000909104811690821681036200063f575050565b61012e805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb910162000611565b61012e5463ffffffff6801000000000000000090910481169082168103620006c6575050565b61012e805463ffffffff60401b19166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1910162000611565b61012e5463ffffffff600160a01b909104811690821681036200074c575050565b61012e805463ffffffff60a01b1916600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3910162000611565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103620007d6575050565b61012e805463ffffffff60601b19166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328910162000611565b61012e5463ffffffff600160801b9091048116908216810362000860575050565b61012e805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b910162000611565b6000620008cd8262000b35565b15620008db57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000940919062000fe4565b92915050565b610133546001600160801b03908116908216810362000963575050565b61013380546001600160801b0319166001600160801b0384811691821792839055600160801b9092049091161115620009ed5760e051620009ce90620009c890620009b8906001600160a01b03163062000b5d565b6001600160801b03851662000bf9565b62000c11565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3910162000611565b6001600160a01b038216600090815261013260205260409020546001600160801b03908116908216810362000a6257505050565b6001600160a01b0383166000818152610132602090815260409182902080546001600160801b0319166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910160405180910390a2505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000b31828262000c80565b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1462000940565b600062000b6a8362000b35565b1562000b8257506001600160a01b0381163162000940565b826040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801562000bcc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf2919062001009565b9392505050565b600081831062000c0a578162000bf2565b5090919050565b60006001600160801b0382111562000c7c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b606482015260840162000152565b5090565b62000c8c828262000cab565b600082815260976020526040902062000ca6908262000d4f565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1662000b315760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000d0b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000bf2836001600160a01b038416600081815260018301602052604081205462000da95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000940565b50600062000940565b6001600160a01b0381168114620000b257600080fd5b600080600080600060a0868803121562000de157600080fd5b855162000dee8162000db2565b602087015190955062000e018162000db2565b604087015190945062000e148162000db2565b606087015190935062000e278162000db2565b608087015190925062000e3a8162000db2565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ea5576001600160801b0382900482111562000e895762000e8962000e48565b8085161562000e9757918102915b93841c939080029062000e63565b509250929050565b60008262000ebe5750600162000940565b8162000ecd5750600062000940565b816001811462000ee6576002811462000ef15762000f2c565b600191505062000940565b60ff84111562000f055762000f0562000e48565b6001841b91506001600160801b0382111562000f255762000f2562000e48565b5062000940565b5060208310610133831016604e8410600b841016171562000f6b575081810a6001600160801b0381111562000f655762000f6562000e48565b62000940565b62000f77838362000e5e565b6001600160801b0381900482111562000f945762000f9462000e48565b029392505050565b600062000bf260ff84166001600160801b03841662000ead565b6001600160801b0381811683821602808216919082811462000fdc5762000fdc62000e48565b505092915050565b60006020828403121562000ff757600080fd5b815160ff8116811462000bf257600080fd5b6000602082840312156200101c57600080fd5b5051919050565b60805160a05160c05160e0516101005161565a620011aa600039600081816104d601528181610f1301528181610fec0152818161301501528181613118015281816131b001528181613687015261377a0152600081816103f00152818161091801528181610fb5015281816110250152818161153301528181611ad201528181611c1e015281816122f1015281816123a001528181612462015281816124d70152818161255401528181612af001528181612f550152818161317601528181613285015281816132ea01528181613335015281816133960152818161341601528181613525015281816135a901528181613637015281816136c0015281816137b10152818161381c0152818161386401528181613f1201528181613f5f0152613f830152600081816110470152818161309f0152818161313b01526136e2015260008181610c5401528181610d8b01528181610df701528181611703015261173f015260008181610c2e01528181610cfa015281816116240152611689015261565a6000f3fe6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + "deployedBytecode": "0x6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a", + "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 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 + }, + "storageLayout": { + "storage": [ + { + "astId": 585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 588, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1318, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1591, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 479, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 33, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roleMembers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)" + }, + { + "astId": 143, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializations", + "offset": 0, + "slot": "201", + "type": "t_uint16" + }, + { + "astId": 12184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 761, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 830, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12536, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_totalCollected", + "offset": 0, + "slot": "301", + "type": "t_uint256" + }, + { + "astId": 12538, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_rewardsPPM", + "offset": 0, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12540, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceResetMultiplier", + "offset": 4, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12542, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmountMultiplier", + "offset": 8, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12544, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLife", + "offset": 12, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12546, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLifeOnReset", + "offset": 16, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12548, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceDecayHalfLife", + "offset": 20, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12553, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_disabledPairs", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_bool)" + }, + { + "astId": 12558, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_tradingStartTimes", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)" + }, + { + "astId": 12564, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialPrice", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)" + }, + { + "astId": 12569, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmounts", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)" + }, + { + "astId": 12572, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenSaleAmount", + "offset": 0, + "slot": "307", + "type": "t_struct(SaleAmount)14811_storage" + }, + { + "astId": 12578, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "308", + "type": "t_array(t_uint256)43_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)43_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[43]", + "numberOfBytes": "1376" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)2901_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_bool)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => struct ICarbonVortex.Price)", + "numberOfBytes": "32", + "value": "t_struct(Price)14806_storage" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint128)", + "numberOfBytes": "32", + "value": "t_uint128" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_struct(AddressSet)2901_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 2900, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)2586_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Price)14806_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.Price", + "members": [ + { + "astId": 14803, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "sourceAmount", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14805, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "targetAmount", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SaleAmount)14811_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.SaleAmount", + "members": [ + { + "astId": 14808, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "initial", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14810, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "current", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)2586_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 2581, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 2585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_userDefinedValueType(Token)10748": { + "encoding": "inplace", + "label": "Token", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/mantle/CarbonVortex_Proxy.json b/deployments/mantle/CarbonVortex_Proxy.json new file mode 100644 index 00000000..32675dc6 --- /dev/null +++ b/deployments/mantle/CarbonVortex_Proxy.json @@ -0,0 +1,369 @@ +{ + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "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" + } + ], + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "transactionIndex": 3, + "gasUsed": "5132177179", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200004000000800000008008020008000000010100000000000000000000100000000010000000000000000000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000200000000000000120000000100040001001140000000000000400000120200000040020000000010000000000040000000000000080000000000000000000000000001000", + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7", + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000008c05ea305235a67c7095a32ad4a2ee2688ade636" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 10, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 11, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 12, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 13, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 14, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 15, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 16, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 17, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 18, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + }, + { + "transactionIndex": 3, + "blockNumber": 69829248, + "transactionHash": "0xc57c5ab7d4c75581d145a9b2e33c661d795a5a08bd749ea4675bcabadbd1a36a", + "address": "0x59f21012B2E9BA67ce6a7605E74F945D0D4C84EA", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4816658ad10bf215053c533cceae3f59e1f1087", + "logIndex": 19, + "blockHash": "0xd2edbb5d293618af552f8c4fca9b0540d1b3a39ff01d7961e8d61750705ff7c7" + } + ], + "blockNumber": 69829248, + "cumulativeGasUsed": "8373119480", + "status": 1, + "byzantium": true + }, + "args": [ + "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", + "0xe4816658ad10bF215053C533cceAe3f59e1f1087", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mantle/ProxyAdmin.json b/deployments/mantle/ProxyAdmin.json new file mode 100644 index 00000000..3a9fb7e8 --- /dev/null +++ b/deployments/mantle/ProxyAdmin.json @@ -0,0 +1,246 @@ +{ + "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xc149547599a48a75a3268a0e497d2613d7c3ac4b22532237453cd6eac4041d4f", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", + "transactionIndex": 6, + "gasUsed": "2981921652", + "logsBloom": "0x00004000820000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000001000000000000000000000000000000000000020000000000000000100800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x843bab252483ee7547c801a0c1451b28549a8f8e1fc0f76638212aae17034717", + "transactionHash": "0xc149547599a48a75a3268a0e497d2613d7c3ac4b22532237453cd6eac4041d4f", + "logs": [ + { + "transactionIndex": 6, + "blockNumber": 69829239, + "transactionHash": "0xc149547599a48a75a3268a0e497d2613d7c3ac4b22532237453cd6eac4041d4f", + "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 21, + "blockHash": "0x843bab252483ee7547c801a0c1451b28549a8f8e1fc0f76638212aae17034717" + } + ], + "blockNumber": 69829239, + "cumulativeGasUsed": "13979764961", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\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\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 Returns the current admin.\\n */\\n function _getAdmin() internal view 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 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(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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\"},\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\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 *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\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(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(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 * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\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 _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\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 _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\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 function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"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/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "devdoc": { + "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", + "kind": "dev", + "methods": { + "changeProxyAdmin(address,address)": { + "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." + }, + "getProxyAdmin(address)": { + "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "getProxyImplementation(address)": { + "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgrade(address,address)": { + "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." + }, + "upgradeAndCall(address,address,bytes)": { + "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4735, + "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/sei/.migrations.json b/deployments/sei/.migrations.json index 7153be7a..6ac950ef 100644 --- a/deployments/sei/.migrations.json +++ b/deployments/sei/.migrations.json @@ -1,5 +1,7 @@ { "0001-ProxyAdmin": 1716825557, "0002-Voucher": 1716825589, - "0003-CarbonController": 1716825693 + "0003-CarbonController": 1716825693, + "0004-ProxyAdmin": 1727796999, + "0005-CarbonVortex": 1727797010 } \ No newline at end of file diff --git a/deployments/sei/CarbonVortex.json b/deployments/sei/CarbonVortex.json new file mode 100644 index 00000000..cbf98aa0 --- /dev/null +++ b/deployments/sei/CarbonVortex.json @@ -0,0 +1,1592 @@ +{ + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "abi": [ + { + "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" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "transactionIndex": 4, + "gasUsed": "813773", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000008000000000000000200000000020000000000000000000008000080100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200004000000800000008000020008000000010100000000000000000000100000000010000000000000000000000000000a0000000008000840000000000000000010004000000000400000000000000000000101000200000000000000020000000100040000000140000000000000400000120300000040020000000010000000000000000000000000080000000000000000000000200000000", + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a", + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "logs": [ + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000c95a9c1f378e0009e49fe7fe33dda22da4f977b0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 3, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 4, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 5, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 7, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 8, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 9, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 10, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 11, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fea28d3a9994bc4e7851035764171a02c3fc23b5", + "logIndex": 12, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + } + ], + "blockNumber": 105711575, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [ + "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "0xfEA28D3a9994BC4e7851035764171a02c3Fc23b5", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/sei/CarbonVortex_Implementation.json b/deployments/sei/CarbonVortex_Implementation.json new file mode 100644 index 00000000..0183e201 --- /dev/null +++ b/deployments/sei/CarbonVortex_Implementation.json @@ -0,0 +1,2062 @@ +{ + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICarbonController", + "name": "carbonController", + "type": "address" + }, + { + "internalType": "contract IVault", + "name": "vault", + "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" + } + ], + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "transactionIndex": 0, + "gasUsed": "5131831", + "logsBloom": "0x000800048200000088000000000000000800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000000000000000000000000000000000000000080000000200004000000800000008000020000000000010100000000000000000000100000000010000000000200000000000000000a0000000008000040000000000000000000004000000000400000000000040000000101000200000000000000000000000100040000000140000000000000000000120200000040020000000010000000000000002000000000080000000000000000000000000000000", + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9", + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 2, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 3, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 4, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 5, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 7, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 8, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 9, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + }, + { + "transactionIndex": 3, + "blockNumber": 105711563, + "transactionHash": "0xd7d92a6a69076cd8622069a2ad4ea6c8f0a1457f0ff2606c964cfe8f1563e187", + "address": "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 10, + "blockHash": "0xfc7e98a5e204b9d344326a6847e160370ad37bf8f4dfacff5bc29f2f1efe35e9" + } + ], + "blockNumber": 105711563, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [ + "0xe4816658ad10bF215053C533cceAe3f59e1f1087", + "0x773B75CfB146bd5d1095fa9d6d45637f02B05119", + "0xE1aB22cd03377db66aeb15687E881Eab9e1a26C1", + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8" + ], + "numDeployments": 1, + "solcInputHash": "7c1f6a32868c060ab88825316a91cddf", + "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\":\"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\":{\"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 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 *\\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 // 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 address payable transferAddress,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(transferAddress) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\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 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 }\\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 3;\\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 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 // 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\":\"0xb2d6cc49ecdc95d58e6047a367f22305082e24d89cbdada6a318f351a42bca90\",\"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": "0x6101206040523480156200001257600080fd5b506040516200684438038062006844833981016040819052620000359162000dc8565b8262000041816200008a565b826200004d816200008a565b6001600160a01b0380881660805286811660a05285811660c05284811660e0528316610100526200007d620000b5565b5050505050505062001023565b6001600160a01b038116620000b25760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000d65750600054600160ff909116105b80620000f25750303b158015620000f2575060005460ff166001145b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200017f576000805461ff0019166101001790555b62000189620001d2565b8015620000b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200022e5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002386200024e565b62000242620002be565b6200024c62000324565b565b600054610100900460ff16620002aa5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002b462000449565b6200024c620004a5565b600054610100900460ff166200031a5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200024c62000545565b600054610100900460ff16620003805760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200038d6103e8620005a8565b6200039960026200061d565b620003a56004620006a0565b620003b261a8c06200072b565b620003bf61a8c0620007ac565b620003cd620d2f006200083f565b6200040d620003ed60e0516001600160a01b0316620008c060201b60201c565b620003fa90600a62000f9c565b6200040790606462000fb6565b62000946565b60e0516200024c90620004296001600160a01b038216620008c0565b6200043690600a62000f9c565b6200044390600a62000fb6565b62000a2e565b600054610100900460ff166200024c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600054610100900460ff16620005015760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b60c9805461ffff191660031790556200052a600080516020620068048339815191528062000ada565b6200024c600080516020620068048339815191523362000b25565b600054610100900460ff16620005a15760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600160fb55565b61012e5463ffffffff9081169082168103620005c2575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a1291015b60405180910390a15050565b61012e5463ffffffff640100000000909104811690821681036200063f575050565b61012e805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb910162000611565b61012e5463ffffffff6801000000000000000090910481169082168103620006c6575050565b61012e805463ffffffff60401b19166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1910162000611565b61012e5463ffffffff600160a01b909104811690821681036200074c575050565b61012e805463ffffffff60a01b1916600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3910162000611565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103620007d6575050565b61012e805463ffffffff60601b19166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328910162000611565b61012e5463ffffffff600160801b9091048116908216810362000860575050565b61012e805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b910162000611565b6000620008cd8262000b35565b15620008db57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000940919062000fe4565b92915050565b610133546001600160801b03908116908216810362000963575050565b61013380546001600160801b0319166001600160801b0384811691821792839055600160801b9092049091161115620009ed5760e051620009ce90620009c890620009b8906001600160a01b03163062000b5d565b6001600160801b03851662000bf9565b62000c11565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3910162000611565b6001600160a01b038216600090815261013260205260409020546001600160801b03908116908216810362000a6257505050565b6001600160a01b0383166000818152610132602090815260409182902080546001600160801b0319166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910160405180910390a2505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000b31828262000c80565b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1462000940565b600062000b6a8362000b35565b1562000b8257506001600160a01b0381163162000940565b826040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801562000bcc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf2919062001009565b9392505050565b600081831062000c0a578162000bf2565b5090919050565b60006001600160801b0382111562000c7c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b606482015260840162000152565b5090565b62000c8c828262000cab565b600082815260976020526040902062000ca6908262000d4f565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1662000b315760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000d0b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000bf2836001600160a01b038416600081815260018301602052604081205462000da95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000940565b50600062000940565b6001600160a01b0381168114620000b257600080fd5b600080600080600060a0868803121562000de157600080fd5b855162000dee8162000db2565b602087015190955062000e018162000db2565b604087015190945062000e148162000db2565b606087015190935062000e278162000db2565b608087015190925062000e3a8162000db2565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ea5576001600160801b0382900482111562000e895762000e8962000e48565b8085161562000e9757918102915b93841c939080029062000e63565b509250929050565b60008262000ebe5750600162000940565b8162000ecd5750600062000940565b816001811462000ee6576002811462000ef15762000f2c565b600191505062000940565b60ff84111562000f055762000f0562000e48565b6001841b91506001600160801b0382111562000f255762000f2562000e48565b5062000940565b5060208310610133831016604e8410600b841016171562000f6b575081810a6001600160801b0381111562000f655762000f6562000e48565b62000940565b62000f77838362000e5e565b6001600160801b0381900482111562000f945762000f9462000e48565b029392505050565b600062000bf260ff84166001600160801b03841662000ead565b6001600160801b0381811683821602808216919082811462000fdc5762000fdc62000e48565b505092915050565b60006020828403121562000ff757600080fd5b815160ff8116811462000bf257600080fd5b6000602082840312156200101c57600080fd5b5051919050565b60805160a05160c05160e0516101005161565a620011aa600039600081816104d601528181610f1301528181610fec0152818161301501528181613118015281816131b001528181613687015261377a0152600081816103f00152818161091801528181610fb5015281816110250152818161153301528181611ad201528181611c1e015281816122f1015281816123a001528181612462015281816124d70152818161255401528181612af001528181612f550152818161317601528181613285015281816132ea01528181613335015281816133960152818161341601528181613525015281816135a901528181613637015281816136c0015281816137b10152818161381c0152818161386401528181613f1201528181613f5f0152613f830152600081816110470152818161309f0152818161313b01526136e2015260008181610c5401528181610d8b01528181610df701528181611703015261173f015260008181610c2e01528181610cfa015281816116240152611689015261565a6000f3fe6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + "deployedBytecode": "0x6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a", + "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 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 + }, + "storageLayout": { + "storage": [ + { + "astId": 585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 588, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1318, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1591, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 479, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 33, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roleMembers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)" + }, + { + "astId": 143, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializations", + "offset": 0, + "slot": "201", + "type": "t_uint16" + }, + { + "astId": 12184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 761, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 830, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12536, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_totalCollected", + "offset": 0, + "slot": "301", + "type": "t_uint256" + }, + { + "astId": 12538, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_rewardsPPM", + "offset": 0, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12540, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceResetMultiplier", + "offset": 4, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12542, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmountMultiplier", + "offset": 8, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12544, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLife", + "offset": 12, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12546, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLifeOnReset", + "offset": 16, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12548, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceDecayHalfLife", + "offset": 20, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12553, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_disabledPairs", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_bool)" + }, + { + "astId": 12558, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_tradingStartTimes", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)" + }, + { + "astId": 12564, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialPrice", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)" + }, + { + "astId": 12569, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmounts", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)" + }, + { + "astId": 12572, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenSaleAmount", + "offset": 0, + "slot": "307", + "type": "t_struct(SaleAmount)14811_storage" + }, + { + "astId": 12578, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "308", + "type": "t_array(t_uint256)43_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)43_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[43]", + "numberOfBytes": "1376" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)2901_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_bool)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => struct ICarbonVortex.Price)", + "numberOfBytes": "32", + "value": "t_struct(Price)14806_storage" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint128)", + "numberOfBytes": "32", + "value": "t_uint128" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_struct(AddressSet)2901_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 2900, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)2586_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Price)14806_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.Price", + "members": [ + { + "astId": 14803, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "sourceAmount", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14805, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "targetAmount", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SaleAmount)14811_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.SaleAmount", + "members": [ + { + "astId": 14808, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "initial", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14810, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "current", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)2586_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 2581, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 2585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_userDefinedValueType(Token)10748": { + "encoding": "inplace", + "label": "Token", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/sei/CarbonVortex_Proxy.json b/deployments/sei/CarbonVortex_Proxy.json new file mode 100644 index 00000000..9f41b937 --- /dev/null +++ b/deployments/sei/CarbonVortex_Proxy.json @@ -0,0 +1,369 @@ +{ + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "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" + } + ], + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "transactionIndex": 4, + "gasUsed": "813773", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000008000000000000000200000000020000000000000000000008000080100000000000000000000000000000000000204000020000000000000000000000000000000000080000000200004000000800000008000020008000000010100000000000000000000100000000010000000000000000000000000000a0000000008000840000000000000000010004000000000400000000000000000000101000200000000000000020000000100040000000140000000000000400000120300000040020000000010000000000000000000000000080000000000000000000000200000000", + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a", + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "logs": [ + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000c95a9c1f378e0009e49fe7fe33dda22da4f977b0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 3, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 4, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 5, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 7, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 8, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 9, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 10, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 11, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + }, + { + "transactionIndex": 10, + "blockNumber": 105711575, + "transactionHash": "0xa4bdb1fe66f557ebfb2a946dcc80c9151b8c087089c247625f08415e66ffffff", + "address": "0x5715203B16F15d7349Cb1E3537365E9664EAf933", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fea28d3a9994bc4e7851035764171a02c3fc23b5", + "logIndex": 12, + "blockHash": "0x67cf0ee5d06a8bb6112040df1284302c3eb2c1a43696ed52e4b34d85f3c7080a" + } + ], + "blockNumber": 105711575, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [ + "0xc95a9c1f378e0009E49Fe7FE33dDa22Da4F977b0", + "0xfEA28D3a9994BC4e7851035764171a02c3Fc23b5", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/sei/ProxyAdmin.json b/deployments/sei/ProxyAdmin.json new file mode 100644 index 00000000..608d85fd --- /dev/null +++ b/deployments/sei/ProxyAdmin.json @@ -0,0 +1,246 @@ +{ + "address": "0xfEA28D3a9994BC4e7851035764171a02c3Fc23b5", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xdf34d7e1c68aba5f9815c11a55f9f6e37a435c2f05a62b62b9217811e862b2fa", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0xfEA28D3a9994BC4e7851035764171a02c3Fc23b5", + "transactionIndex": 0, + "gasUsed": "483751", + "logsBloom": "0x00000000820000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000001000008000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000020000000000000200000000000000000000000000000000000000000000000000000", + "blockHash": "0x3b66cce0e1381b0833d33458d9c607541b523629b697f6933d0cf55cd33b77a3", + "transactionHash": "0xdf34d7e1c68aba5f9815c11a55f9f6e37a435c2f05a62b62b9217811e862b2fa", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 105711549, + "transactionHash": "0xdf34d7e1c68aba5f9815c11a55f9f6e37a435c2f05a62b62b9217811e862b2fa", + "address": "0xfEA28D3a9994BC4e7851035764171a02c3Fc23b5", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x3b66cce0e1381b0833d33458d9c607541b523629b697f6933d0cf55cd33b77a3" + } + ], + "blockNumber": 105711549, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\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\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 Returns the current admin.\\n */\\n function _getAdmin() internal view 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 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(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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\"},\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\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 *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\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(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(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 * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\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 _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\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 _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\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 function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"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/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "devdoc": { + "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", + "kind": "dev", + "methods": { + "changeProxyAdmin(address,address)": { + "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." + }, + "getProxyAdmin(address)": { + "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "getProxyImplementation(address)": { + "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgrade(address,address)": { + "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." + }, + "upgradeAndCall(address,address,bytes)": { + "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4735, + "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/telos/.chainId b/deployments/telos/.chainId new file mode 100644 index 00000000..425151f3 --- /dev/null +++ b/deployments/telos/.chainId @@ -0,0 +1 @@ +40 diff --git a/deployments/telos/.migrations.json b/deployments/telos/.migrations.json new file mode 100644 index 00000000..dce97686 --- /dev/null +++ b/deployments/telos/.migrations.json @@ -0,0 +1,4 @@ +{ + "0001-ProxyAdmin": 1727796152, + "0002-CarbonVortex": 1727796167 +} \ No newline at end of file diff --git a/deployments/telos/CarbonVortex.json b/deployments/telos/CarbonVortex.json new file mode 100644 index 00000000..6c6528bc --- /dev/null +++ b/deployments/telos/CarbonVortex.json @@ -0,0 +1,1592 @@ +{ + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "abi": [ + { + "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" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "transactionIndex": 0, + "gasUsed": "813555", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000001000000000000100200000000020000000000000000000008000000100000000000000000000000000000000000204000020000000040000000000000000000000000080000000200004000000800000008000020008000000010100000000000000000000100000001010000000000000100000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000200000000000000020000000100040000000140000000000000400000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe", + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000005bca3389786385a35bca14c2d0582adc6cb2482e" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 3, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 4, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 5, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 7, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 8, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 9, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 10, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 11, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa", + "logIndex": 12, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + } + ], + "blockNumber": 365641920, + "cumulativeGasUsed": "813555", + "status": 1, + "byzantium": true + }, + "args": [ + "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/telos/CarbonVortex_Implementation.json b/deployments/telos/CarbonVortex_Implementation.json new file mode 100644 index 00000000..1ebe8776 --- /dev/null +++ b/deployments/telos/CarbonVortex_Implementation.json @@ -0,0 +1,2062 @@ +{ + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICarbonController", + "name": "carbonController", + "type": "address" + }, + { + "internalType": "contract IVault", + "name": "vault", + "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" + } + ], + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "transactionIndex": 0, + "gasUsed": "5129911", + "logsBloom": "0x000800048200000088000000000000000800400100000000100000000000000000000000000200000000000000000000000000000008000000100000000000000000000000000000000000204000000000000000000000000000000000000000080008000200004000000800000008000020000000000010100000800000000000000100000000010000000000002000000000000000a0000000008000040000000000000000000004000000000400000000000000000000101000200000000000000000000000100040000000140000000000000000000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350", + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 2, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 3, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 4, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 5, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 7, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 8, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 9, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + }, + { + "transactionIndex": 0, + "blockNumber": 365641910, + "transactionHash": "0xab52e7e16ae66d0fab6bda16406e3b09eb8fc0f7b103fbfdf6aa160402a8483e", + "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 10, + "blockHash": "0xbf19ff0ab5f6d977cee5e2b4d2abca15b238767f6eb3891ec3714ad8aca87350" + } + ], + "blockNumber": 365641910, + "cumulativeGasUsed": "5129911", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x8cE318919438982514F9f479FDfB40D32C6ab749", + "0xE1aB22cd03377db66aeb15687E881Eab9e1a26C1", + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "0xA0fB8cd450c8Fd3a11901876cD5f17eB47C6bc50" + ], + "numDeployments": 1, + "solcInputHash": "7c1f6a32868c060ab88825316a91cddf", + "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\":\"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\":{\"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 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 *\\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 // 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 address payable transferAddress,\\n Token targetTokenInit,\\n Token finalTargetTokenInit\\n ) validAddress(transferAddress) validAddress(Token.unwrap(targetTokenInit)) {\\n _carbonController = carbonController;\\n _vault = vault;\\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 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 }\\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 3;\\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 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 // 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\":\"0xb2d6cc49ecdc95d58e6047a367f22305082e24d89cbdada6a318f351a42bca90\",\"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": "0x6101206040523480156200001257600080fd5b506040516200684438038062006844833981016040819052620000359162000dc8565b8262000041816200008a565b826200004d816200008a565b6001600160a01b0380881660805286811660a05285811660c05284811660e0528316610100526200007d620000b5565b5050505050505062001023565b6001600160a01b038116620000b25760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000d65750600054600160ff909116105b80620000f25750303b158015620000f2575060005460ff166001145b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200017f576000805461ff0019166101001790555b62000189620001d2565b8015620000b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200022e5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002386200024e565b62000242620002be565b6200024c62000324565b565b600054610100900460ff16620002aa5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b620002b462000449565b6200024c620004a5565b600054610100900460ff166200031a5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200024c62000545565b600054610100900460ff16620003805760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b6200038d6103e8620005a8565b6200039960026200061d565b620003a56004620006a0565b620003b261a8c06200072b565b620003bf61a8c0620007ac565b620003cd620d2f006200083f565b6200040d620003ed60e0516001600160a01b0316620008c060201b60201c565b620003fa90600a62000f9c565b6200040790606462000fb6565b62000946565b60e0516200024c90620004296001600160a01b038216620008c0565b6200043690600a62000f9c565b6200044390600a62000fb6565b62000a2e565b600054610100900460ff166200024c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600054610100900460ff16620005015760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b60c9805461ffff191660031790556200052a600080516020620068048339815191528062000ada565b6200024c600080516020620068048339815191523362000b25565b600054610100900460ff16620005a15760405162461bcd60e51b815260206004820152602b60248201526000805160206200682483398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000152565b600160fb55565b61012e5463ffffffff9081169082168103620005c2575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a1291015b60405180910390a15050565b61012e5463ffffffff640100000000909104811690821681036200063f575050565b61012e805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb910162000611565b61012e5463ffffffff6801000000000000000090910481169082168103620006c6575050565b61012e805463ffffffff60401b19166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1910162000611565b61012e5463ffffffff600160a01b909104811690821681036200074c575050565b61012e805463ffffffff60a01b1916600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3910162000611565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103620007d6575050565b61012e805463ffffffff60601b19166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328910162000611565b61012e5463ffffffff600160801b9091048116908216810362000860575050565b61012e805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b910162000611565b6000620008cd8262000b35565b15620008db57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000940919062000fe4565b92915050565b610133546001600160801b03908116908216810362000963575050565b61013380546001600160801b0319166001600160801b0384811691821792839055600160801b9092049091161115620009ed5760e051620009ce90620009c890620009b8906001600160a01b03163062000b5d565b6001600160801b03851662000bf9565b62000c11565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3910162000611565b6001600160a01b038216600090815261013260205260409020546001600160801b03908116908216810362000a6257505050565b6001600160a01b0383166000818152610132602090815260409182902080546001600160801b0319166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f910160405180910390a2505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000b31828262000c80565b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1462000940565b600062000b6a8362000b35565b1562000b8257506001600160a01b0381163162000940565b826040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801562000bcc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf2919062001009565b9392505050565b600081831062000c0a578162000bf2565b5090919050565b60006001600160801b0382111562000c7c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b606482015260840162000152565b5090565b62000c8c828262000cab565b600082815260976020526040902062000ca6908262000d4f565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1662000b315760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000d0b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000bf2836001600160a01b038416600081815260018301602052604081205462000da95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000940565b50600062000940565b6001600160a01b0381168114620000b257600080fd5b600080600080600060a0868803121562000de157600080fd5b855162000dee8162000db2565b602087015190955062000e018162000db2565b604087015190945062000e148162000db2565b606087015190935062000e278162000db2565b608087015190925062000e3a8162000db2565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ea5576001600160801b0382900482111562000e895762000e8962000e48565b8085161562000e9757918102915b93841c939080029062000e63565b509250929050565b60008262000ebe5750600162000940565b8162000ecd5750600062000940565b816001811462000ee6576002811462000ef15762000f2c565b600191505062000940565b60ff84111562000f055762000f0562000e48565b6001841b91506001600160801b0382111562000f255762000f2562000e48565b5062000940565b5060208310610133831016604e8410600b841016171562000f6b575081810a6001600160801b0381111562000f655762000f6562000e48565b62000940565b62000f77838362000e5e565b6001600160801b0381900482111562000f945762000f9462000e48565b029392505050565b600062000bf260ff84166001600160801b03841662000ead565b6001600160801b0381811683821602808216919082811462000fdc5762000fdc62000e48565b505092915050565b60006020828403121562000ff757600080fd5b815160ff8116811462000bf257600080fd5b6000602082840312156200101c57600080fd5b5051919050565b60805160a05160c05160e0516101005161565a620011aa600039600081816104d601528181610f1301528181610fec0152818161301501528181613118015281816131b001528181613687015261377a0152600081816103f00152818161091801528181610fb5015281816110250152818161153301528181611ad201528181611c1e015281816122f1015281816123a001528181612462015281816124d70152818161255401528181612af001528181612f550152818161317601528181613285015281816132ea01528181613335015281816133960152818161341601528181613525015281816135a901528181613637015281816136c0015281816137b10152818161381c0152818161386401528181613f1201528181613f5f0152613f830152600081816110470152818161309f0152818161313b01526136e2015260008181610c5401528181610d8b01528181610df701528181611703015261173f015260008181610c2e01528181610cfa015281816116240152611689015261565a6000f3fe6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", + "deployedBytecode": "0x6080604052600436106102eb5760003560e01c806394cb094711610184578063cb8ea538116100d6578063e60963f81161008a578063eec245e211610064578063eec245e214610986578063ef7cbc4a146109a6578063fa6ca9e8146109c657600080fd5b8063e60963f8146108c9578063ea2e12e514610909578063ecd844ae1461095e57600080fd5b8063d547741f116100bb578063d547741f14610873578063debcf1fe14610893578063e29eb836146108b357600080fd5b8063cb8ea53814610833578063d1591fa61461085357600080fd5b8063a7ae00d211610138578063c735ce4311610112578063c735ce43146107d7578063c7f53874146107f7578063ca15c8731461081357600080fd5b8063a7ae00d21461076b578063ac5b12ec1461078b578063bedf9525146107b757600080fd5b80639dee50ea116101695780639dee50ea14610716578063a1a660a714610736578063a217fddf1461075657600080fd5b806394cb0947146106bc5780639c18c763146106dc57600080fd5b8063613ef7ed1161023d57806384ba3f69116101f157806391d14854116101cb57806391d148541461062357806393867fb51461066957806394717ae91461069c57600080fd5b806384ba3f691461058a5780638619c0d9146105b75780639010d07c1461060357600080fd5b80636b36b05b116102225780636b36b05b1461051d5780638129fc1c1461053d578063824316881461055257600080fd5b8063613ef7ed146104c757806363ee9e4e146104fa57600080fd5b8063327107f71161029f5780634bb69ddb116102795780634bb69ddb1461046b5780634c0a0dfa1461048b57806354fd4d50146104ab57600080fd5b8063327107f7146103e157806336568abe146104285780634b4e97ee1461044857600080fd5b80630d108f2c116102d05780630d108f2c14610361578063248a9ca3146103835780632f2ff15d146103c157600080fd5b806301ffc9a7146102f7578063035dff191461032c57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b50610317610312366004614d1f565b6109d9565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b5061012e54640100000000900463ffffffff165b60405163ffffffff9091168152602001610323565b34801561036d57600080fd5b5061038161037c366004614d61565b610a35565b005b34801561038f57600080fd5b506103b361039e366004614d87565b60009081526065602052604090206001015490565b604051908152602001610323565b3480156103cd57600080fd5b506103816103dc366004614db5565b610a7c565b3480156103ed57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610323565b34801561043457600080fd5b50610381610443366004614db5565b610aa6565b34801561045457600080fd5b5061012e54600160801b900463ffffffff1661034c565b34801561047757600080fd5b50610381610486366004614d61565b610b33565b34801561049757600080fd5b506103816104a6366004614e2a565b610b76565b3480156104b757600080fd5b5060405160038152602001610323565b3480156104d357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610410565b34801561050657600080fd5b5061012e54600160a01b900463ffffffff1661034c565b34801561052957600080fd5b50610381610538366004614d61565b611258565b34801561054957600080fd5b50610381611295565b34801561055e57600080fd5b5061057261056d366004614e83565b6113b5565b6040516001600160801b039091168152602001610323565b34801561059657600080fd5b506105aa6105a5366004614eb8565b611470565b6040516103239190614ed5565b3480156105c357600080fd5b5060408051808201825260008082526020918201528151808301909252610133546001600160801b038082168452600160801b90910416908201526105aa565b34801561060f57600080fd5b5061041061061e366004614ef9565b6115ba565b34801561062f57600080fd5b5061031761063e366004614db5565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561067557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966103b3565b3480156106a857600080fd5b506103816106b7366004614f1b565b6115d9565b3480156106c857600080fd5b506103b36106d7366004614eb8565b61161f565b3480156106e857600080fd5b506103176106f7366004614eb8565b6001600160a01b0316600090815261012f602052604090205460ff1690565b34801561072257600080fd5b50610381610731366004614d61565b61178d565b34801561074257600080fd5b50610381610751366004614f36565b6117d0565b34801561076257600080fd5b506103b3600081565b34801561077757600080fd5b50610572610786366004614e83565b611934565b34801561079757600080fd5b5061012e546c01000000000000000000000000900463ffffffff1661034c565b3480156107c357600080fd5b506103176107d2366004614eb8565b6119db565b3480156107e357600080fd5b506103816107f2366004614fc9565b611a02565b34801561080357600080fd5b5061012e5463ffffffff1661034c565b34801561081f57600080fd5b506103b361082e366004614d87565b611a36565b34801561083f57600080fd5b5061038161084e366004614d61565b611a4d565b34801561085f57600080fd5b5061038161086e366004614f1b565b611a90565b34801561087f57600080fd5b5061038161088e366004614db5565b611af7565b34801561089f57600080fd5b506103816108ae366004614ff7565b611b1c565b3480156108bf57600080fd5b5061012d546103b3565b3480156108d557600080fd5b506105726108e4366004614eb8565b6001600160a01b0316600090815261013260205260409020546001600160801b031690565b34801561091557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600090815261013260205260409020546001600160801b0316610572565b34801561096a57600080fd5b5061012e5468010000000000000000900463ffffffff1661034c565b34801561099257600080fd5b506105726109a1366004614eb8565b611ba3565b3480156109b257600080fd5b506103816109c1366004614d61565b611bae565b6103816109d436600461507c565b611bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610a2f5750610a2f82611ccf565b92915050565b610a5f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610a6f81611dc2565b610a7882611dfc565b5050565b600082815260656020526040902060010154610a9781611e9b565b610aa18383611ea5565b505050565b6001600160a01b0381163314610b295760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a788282611ec7565b610b5d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16610b6d81611dc2565b610a7882611ee9565b610b7e611f82565b8181610b8a8282611fdb565b8260008167ffffffffffffffff811115610ba657610ba66150c1565b604051908082528060200260200182016040528015610bcf578160200160208202803683370190505b50905060008267ffffffffffffffff811115610bed57610bed6150c1565b604051908082528060200260200182016040528015610c16578160200160208202803683370190505b5061012e5490915063ffffffff166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081161515907f000000000000000000000000000000000000000000000000000000000000000016151560005b86811015610eb85760008b8b83818110610c9557610c956150d7565b9050602002016020810190610caa9190614eb8565b905060008415610d74576040517f9ba372c20000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260001960248301523060448301527f00000000000000000000000000000000000000000000000000000000000000001690639ba372c2906064016020604051808303816000875af1158015610d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6791906150ed565b610d71908261511c565b90505b8315610e65576000610daf6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b6040517f1c20fadd0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000000000000000000000000000000000000000000090911690631c20fadd90606401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505050508082610e61919061511c565b9150505b80888481518110610e7857610e786150d7565b6020908102919091010152610e918187620f42406121cc565b878481518110610ea357610ea36150d7565b60209081029190910101525050600101610c79565b5060005b868110156112065760008b8b83818110610ed857610ed86150d7565b9050602002016020810190610eed9190614eb8565b90506000878381518110610f0357610f036150d7565b60200260200101519050610f43827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15610f4f5750506111fe565b801580610f7557506001600160a01b038216600090815261012f602052604090205460ff165b15610f815750506111fe565b6000878481518110610f9557610f956150d7565b6020026020010151905060008183610fad919061512f565b9050610fe5847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561110a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661108a5761106c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836122a7565b8061012d600082825461107f919061511c565b909155506111f99050565b6001600160a01b0384166000908152610130602052604090205463ffffffff1615806110e857506001600160a01b038416600090815261013260205260409020546001600160801b03166110dd856122e9565b6001600160801b0316105b806110f757506110f78461235a565b156111055761110582612424565b6111f9565b6000611115856122e9565b905061113f856001600160a01b03166000908152610130602052604090205463ffffffff16151590565b158061117b57506001600160a01b038516600090815261013260205260409020546001600160801b0390811690611179908490841661512f565b105b806111d957506001600160a01b0385166000908152610132602052604090205461012e546111c4916001600160801b03169068010000000000000000900463ffffffff16615142565b6001600160801b0316816001600160801b0316115b806111e857506111e88561235a565b156111f7576111f785846125b7565b505b505050505b600101610ebc565b50611246338b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506126b2915050565b5050505050505050610a78600160fb55565b6112827f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8061128c8161272a565b610a788261276d565b600054610100900460ff16158080156112b55750600054600160ff909116105b806112cf5750303b1580156112cf575060005460ff166001145b6113415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b20565b6000805460ff191660011790558015611364576000805461ff0019166101001790555b61136c6127d9565b80156113b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000826113c18161285e565b60006113cc85611470565b90506113d781612908565b600061140f61140a83602001516001600160801b0316876001600160801b031685600001516001600160801b03166121cc565b612960565b905061141a866122e9565b6001600160801b0316816001600160801b03161115611465576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b0382166000908152610130602052604081205463ffffffff16908190036114de576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ea824261516d565b6001600160a01b038581166000818152610131602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152939450917f0000000000000000000000000000000000000000000000000000000000000000161461156e5761012e54600160a01b900463ffffffff16611589565b61012e546c01000000000000000000000000900463ffffffff165b90506115a661140a83600001516001600160801b031685846129e3565b6001600160801b0316825250949350505050565b60008281526097602052604081206115d29083612a6b565b9392505050565b6116037f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b031661161681611dc2565b610a7882612a77565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611701576040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906150ed565b6116fe908261511c565b90505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611770576117636001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000612125565b61176d908261511c565b90505b6117836001600160a01b03841630612125565b6115d2908261511c565b6117b77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff166117c781611dc2565b610a7882612b84565b826117da81612c1b565b85856117e68282611fdb565b6117ee611f82565b6118187f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b86848114611852576040517f0b83f83800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156118b9576118b188888884818110611873576118736150d7565b905060200201358c8c8581811061188c5761188c6150d7565b90506020020160208101906118a19190614eb8565b6001600160a01b031691906122a7565b600101611855565b50866001600160a01b0316336001600160a01b03168a8a6040516118de92919061518a565b60405180910390207f928c965b5a7ac3964d452392d2920cfe16f13634362554650837410a99cc3b5589896040516119179291906151cc565b60405180910390a45061192a600160fb55565b5050505050505050565b6000826119408161285e565b611949846122e9565b6001600160801b0316836001600160801b03161115611994576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061199f85611470565b90506119aa81612908565b61146561140a82600001516001600160801b0316866001600160801b031684602001516001600160801b0316612c5b565b6001600160a01b0381166000908152610130602052604081205463ffffffff161515610a2f565b611a2c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b610a788282612cb2565b6000818152609760205260408120610a2f90612d3e565b611a777f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611a8781611dc2565b610a7882612d48565b611aba7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b806001600160801b0316611acd81611dc2565b610a787f000000000000000000000000000000000000000000000000000000000000000083612de9565b600082815260656020526040902060010154611b1281611e9b565b610aa18383611ec7565b60c954600090611b319061ffff16600161521e565b90506003848015611b4a57508061ffff168261ffff1614155b15611b81576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b8a578091505b60c9805461ffff191661ffff84161790555b5050505050565b6000610a2f826122e9565b611bd87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611d66565b8063ffffffff16611be881611dc2565b610a7882612ea4565b611bf9611f82565b82611c038161285e565b826001600160801b0316611c1681611dc2565b6000611c4e867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b15611c6457611c5d8585612f4d565b9050611c72565b611c6f86868661347d565b90505b604080516001600160801b038084168252871660208201526001600160a01b0388169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a3505050610aa1600160fb55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610a2f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b2576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff600160a01b90910481169082168103611e1c575050565b61012e80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b6113b281336138c9565b611eaf828261393e565b6000828152609760205260409020610aa190826139e0565b611ed182826139f5565b6000828152609760205260409020610aa19082613a78565b61012e5463ffffffff64010000000090910481169082168103611f0a575050565b61012e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb9101611e8f565b600260fb5403611fd45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b20565b600260fb55565b806000819003612017576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561211f576000848483818110612036576120366150d7565b905060200201602081019061204b9190614eb8565b90506001600160a01b03811661208d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015b83811015612115576120d6828787848181106120b0576120b06150d7565b90506020020160208101906120c59190614eb8565b6001600160a01b0390811691161490565b1561210d576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612092565b505060010161201a565b50505050565b600061213083613a8d565b1561214657506001600160a01b03811631610a2f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa1580156121a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d291906150ed565b60008060006121db8686613ab4565b9150915081600003612200578381816121f6576121f6615239565b04925050506115d2565b83821061222057604051631a93c68960e11b815260040160405180910390fd5b600061222d878787613aef565b905060008061223d858585613b0a565b91509150816000036122655786818161225857612258615239565b04955050505050506115d2565b6000878103881690612278848484613b3a565b90506000612294838b8161228e5761228e615239565b04613b77565b919091029b9a5050505050505050505050565b806000036122b457505050565b6122bd83613a8d565b156122d557610aa16001600160a01b03831682613b98565b610aa16001600160a01b0384168383613cb1565b6000612321827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b1561233f57505061013354600160801b90046001600160801b031690565b610a2f61140a6001600160a01b03841630612125565b919050565b6001600160a01b0381166000908152610130602052604081205463ffffffff1680820361238a5750600092915050565b6000612396824261516d565b905060006123d0857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6123ea5761012e54600160a01b900463ffffffff16612405565b61012e546c01000000000000000000000000900463ffffffff165b90506080612413828461524f565b63ffffffff16101595945050505050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061251961140a836124fd6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b612507919061512f565b610133546001600160801b0316613d5a565b61013380546001600160801b03928316600160801b02921691909117905561012e546125529063ffffffff600160a01b90910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516125ab9190614ed5565b60405180910390a25050565b60408051808201825260008082526020918201819052825180840184526001600160801b0380825264e8d4a510008285019081526001600160a01b03881684526101308552858420805463ffffffff421663ffffffff19909116179055610131909452938220815193518516600160801b029390941692909217909255905061266c83600261265d856126536001600160a01b03851630612125565b61140a919061512f565b6126679190615272565b612de9565b826001600160a01b03167f5ca7720c6803d2fa51e59501f044b092942f5ca58436a564f81c63c7e5b95466826040516126a59190614ed5565b60405180910390a2505050565b815160005b81811015611b9c5760008482815181106126d3576126d36150d7565b6020026020010151905060008483815181106126f1576126f16150d7565b602002602001015190506127198782846001600160a01b03166122a79092919063ffffffff16565b50506001016126b7565b600160fb55565b620f424063ffffffff821611156113b2576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e5463ffffffff9081169082168103612786575050565b61012e805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527fae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a129101611e8f565b600054610100900460ff166128445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61284c613d70565b612854613deb565b61285c613e5e565b565b6001600160a01b0381166000908152610130602052604090205463ffffffff166128b4576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116600090815261012f602052604090205460ff16156113b2576040517f74c5330a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516001600160801b0316158061292a575060208101516001600160801b0316155b156113b2576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160801b038211156129df5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610b20565b5090565b6000806129f0838561524f565b63ffffffff1690506000612a04848661528c565b63ffffffff169050600060405180604001604052808381526020018663ffffffff1681525090506000612a3682613fc6565b9050612a5f888260200151866002612a4e9190615491565b8451612a5a919061549d565b6121cc565b98975050505050505050565b60006115d283836143a4565b610133546001600160801b039081169082168103612a93575050565b61013380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115612b4457612b2561140a612b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b846001600160801b0316613d5a565b61013380546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527fdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd39101611e8f565b61012e5463ffffffff600160801b90910481169082168103612ba4575050565b61012e80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b9101611e8f565b6001600160a01b0381166113b2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c698585856121cc565b90506000612c78868686613aef565b1115612caa576000198110612ca057604051631a93c68960e11b815260040160405180910390fd5b60010190506115d2565b949350505050565b6001600160a01b038216600090815261012f602052604090205460ff1681151581151503612cdf57505050565b6001600160a01b038316600081815261012f6020908152604091829020805460ff191686151590811790915582518515158152918201527ffee4ac8750f51e1aaece4e95e80a8a961f8865ad4cc9938493b7d3d280cf18ff91016126a5565b6000610a2f825490565b61012e5463ffffffff6801000000000000000090910481169082168103612d6d575050565b61012e80547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce19101611e8f565b6001600160a01b038216600090815261013260205260409020546001600160801b039081169082168103612e1c57505050565b6001600160a01b0383166000818152610132602090815260409182902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0387811691821790925583519186168252918101919091527f5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f91016126a5565b61012e5463ffffffff6c0100000000000000000000000090910481169082168103612ecd575050565b61012e80547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc8432113289101611e8f565b600080612f7a7f000000000000000000000000000000000000000000000000000000000000000085611934565b9050806001600160801b0316600003612fbf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561300b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036130d357806001600160801b0316341015613092576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ce6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160801b038316613b98565b613169565b341561310b576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131696001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f00000000000000000000000000000000000000000000000000000000000000006001600160801b0385166143ce565b6131a66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336001600160801b0387166122a7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156131fa5750806001600160801b031634115b1561321c5761321c6132156001600160801b0383163461512f565b3390613b98565b806001600160801b031661012d6000828254613238919061511c565b90915550506101338054859190601090613263908490600160801b90046001600160801b03166154b4565b82546101009290920a6001600160801b038181021990931691831602179091557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461013354908216600160801b909104909116101590506115d25761331061140a6125076001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630612125565b61013380546001600160801b03928316600160801b02921691909117905560006133597f0000000000000000000000000000000000000000000000000000000000000000611470565b61012e548151919250640100000000900463ffffffff1690829061337e908390615142565b6001600160801b039081169091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152610131602090815260408083208651838801518616600160801b908102919096161790556101309091529020805463ffffffff42811663ffffffff199092169190911790915561012e5461341493509190910416612ea4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b8260405161346d9190614ed5565b60405180910390a2509392505050565b60008061348a8585611934565b9050806001600160801b03166000036134cf576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160801b0316816001600160801b0316111561351b576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580156135685750600034115b1561359f576040517f26697e9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156135f35750806001600160801b031634105b1561362a576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136686001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306001600160801b0385166143ce565b6136856001600160a01b038616336001600160801b0387166143f8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613732576137106001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006001600160801b0384166122a7565b806001600160801b031661012d600082825461372c919061511c565b90915550505b6001600160a01b038516600090815261013260205260409020546001600160801b031661375e866122e9565b6001600160801b03161015613778576137788560006125b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161580159061384b575061012e547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000908152610132602052604090205461380e9168010000000000000000900463ffffffff16906001600160801b0316615272565b6001600160801b03166138407f00000000000000000000000000000000000000000000000000000000000000006122e9565b6001600160801b0316105b1561385a5761385a6000612424565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480156138ae5750806001600160801b031634115b15612caa57612caa6132156001600160801b0383163461512f565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a78576138fc81614449565b61390783602061445b565b6040516020016139189291906154f8565b60408051601f198184030181529082905262461bcd60e51b8252610b2091600401615579565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a785760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561399c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115d2836001600160a01b038416614684565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a785760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115d2836001600160a01b0384166146d3565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610a2f565b6000806000613ac385856147c6565b9050848402808210613adc579081900392509050613ae8565b60018183030393509150505b9250929050565b60008180613aff57613aff615239565b838509949350505050565b600080828410613b205750839050818303613b32565b613b2b60018661512f565b9150508183035b935093915050565b600080613b588380830381613b5157613b51615239565b0460010190565b9050828481613b6957613b69615239565b048186021795945050505050565b60006001815b60088110156114695783820260020382029150600101613b7d565b80471015613be85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c35576040519150601f19603f3d011682016040523d82523d6000602084013e613c3a565b606091505b5050905080610aa15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b20565b6040516001600160a01b038316602482015260448101829052610aa19084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526147d5565b6000818310613d6957816115d2565b5090919050565b600054610100900460ff16613ddb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613de36148bd565b61285c614928565b600054610100900460ff16613e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b61285c6149f5565b600054610100900460ff16613ec95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b613ed46103e861276d565b613ede6002611ee9565b613ee86004612d48565b613ef361a8c0611dfc565b613efe61a8c0612ea4565b613f0a620d2f00612b84565b613f5a613f3f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613f4a90600a6155ac565b613f55906064615142565b612a77565b61285c7f0000000000000000000000000000000000000000000000000000000000000000613fb07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614a60565b613fbb90600a6155ac565b61266790600a615142565b60408051808201909152600080825260208201526000613fff6f58b90bfbe8e7bcd5e4f1d9cc01f97b57846000015185602001516121cc565b905060008080700800000000000000000000000000000000841061403657604051631a93c68960e11b815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f1000000000000000000000000000000084161561421b5770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f2000000000000000000000000000000084161561425d577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f4000000000000000000000000000000084161561429e576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156142d2576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b841615614306576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b700200000000000000000000000000000000841615614346576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b700400000000000000000000000000000000841615614384576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106143bb576143bb6150d7565b9060005260206000200154905092915050565b8015806143df57506143df84613a8d565b61211f5761211f6001600160a01b038516848484614ada565b8060000361440557505050565b61440e83613a8d565b156122d5576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561211f573d6000803e3d6000fd5b6060610a2f6001600160a01b03831660145b6060600061446a83600261549d565b61447590600261511c565b67ffffffffffffffff81111561448d5761448d6150c1565b6040519080825280601f01601f1916602001820160405280156144b7576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ee576144ee6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614551576145516150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061458d84600261549d565b61459890600161511c565b90505b6001811115614635577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106145d9576145d96150d7565b1a60f81b8282815181106145ef576145ef6150d7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361462e816155c4565b905061459b565b5083156115d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b20565b60008181526001830160205260408120546146cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a2f565b506000610a2f565b600081815260018301602052604081205480156147bc5760006146f760018361512f565b855490915060009061470b9060019061512f565b905081811461477057600086600001828154811061472b5761472b6150d7565b906000526020600020015490508087600001848154811061474e5761474e6150d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614781576147816155db565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a2f565b6000915050610a2f565b60006000198284099392505050565b600061482a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b2b9092919063ffffffff16565b905080516000148061484b57508080602001905181019061484b91906155f1565b610aa15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b20565b600054610100900460ff1661285c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b600054610100900460ff166149935760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b60c9805461ffff191660031790556149cb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614b3a565b61285c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614b85565b600054610100900460ff166127235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b20565b6000614a6b82613a8d565b15614a7857506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f919061560e565b6040516001600160a01b038085166024830152831660448201526064810182905261211f9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613cf6565b6060612caa8484600085614b8f565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610a788282611ea5565b606082471015614c075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b20565b600080866001600160a01b03168587604051614c239190615631565b60006040518083038185875af1925050503d8060008114614c60576040519150601f19603f3d011682016040523d82523d6000602084013e614c65565b606091505b5091509150614c7687838387614c81565b979650505050505050565b60608315614cf0578251600003614ce9576001600160a01b0385163b614ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b20565b5081612caa565b612caa8383815115614d055781518083602001fd5b8060405162461bcd60e51b8152600401610b209190615579565b600060208284031215614d3157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d257600080fd5b600060208284031215614d7357600080fd5b813563ffffffff811681146115d257600080fd5b600060208284031215614d9957600080fd5b5035919050565b6001600160a01b03811681146113b257600080fd5b60008060408385031215614dc857600080fd5b823591506020830135614dda81614da0565b809150509250929050565b60008083601f840112614df757600080fd5b50813567ffffffffffffffff811115614e0f57600080fd5b6020830191508360208260051b8501011115613ae857600080fd5b60008060208385031215614e3d57600080fd5b823567ffffffffffffffff811115614e5457600080fd5b614e6085828601614de5565b90969095509350505050565b80356001600160801b038116811461235557600080fd5b60008060408385031215614e9657600080fd5b8235614ea181614da0565b9150614eaf60208401614e6c565b90509250929050565b600060208284031215614eca57600080fd5b81356115d281614da0565b60408101610a2f828480516001600160801b03908116835260209182015116910152565b60008060408385031215614f0c57600080fd5b50508035926020909101359150565b600060208284031215614f2d57600080fd5b6115d282614e6c565b600080600080600060608688031215614f4e57600080fd5b853567ffffffffffffffff80821115614f6657600080fd5b614f7289838a01614de5565b909750955060208801359150614f8782614da0565b90935060408701359080821115614f9d57600080fd5b50614faa88828901614de5565b969995985093965092949392505050565b80151581146113b257600080fd5b60008060408385031215614fdc57600080fd5b8235614fe781614da0565b91506020830135614dda81614fbb565b60008060006040848603121561500c57600080fd5b833561501781614fbb565b9250602084013567ffffffffffffffff8082111561503457600080fd5b818601915086601f83011261504857600080fd5b81358181111561505757600080fd5b87602082850101111561506957600080fd5b6020830194508093505050509250925092565b60008060006060848603121561509157600080fd5b833561509c81614da0565b92506150aa60208501614e6c565b91506150b860408501614e6c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150ff57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a2f57610a2f615106565b81810381811115610a2f57610a2f615106565b6001600160801b0381811683821602808216919082811461516557615165615106565b505092915050565b63ffffffff82811682821603908082111561146957611469615106565b60008184825b858110156151c15781356151a381614da0565b6001600160a01b031683526020928301929190910190600101615190565b509095945050505050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561520557600080fd5b8260051b80856040850137919091016040019392505050565b61ffff81811683821601908082111561146957611469615106565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061526657615266615239565b92169190910492915050565b60006001600160801b038084168061526657615266615239565b600063ffffffff808416806152a3576152a3615239565b92169190910692915050565b600181815b808511156152ea5781600019048211156152d0576152d0615106565b808516156152dd57918102915b93841c93908002906152b4565b509250929050565b600181815b808511156152ea57816001600160801b030482111561531857615318615106565b8085161561532557918102915b93841c93908002906152f7565b60008261534157506001610a2f565b8161534e57506000610a2f565b8160018114615364576002811461536e5761538a565b6001915050610a2f565b60ff84111561537f5761537f615106565b50506001821b610a2f565b5060208310610133831016604e8410600b84101617156153ad575081810a610a2f565b6153b783836152af565b80600019048211156153cb576153cb615106565b029392505050565b6000826153e257506001610a2f565b816153ef57506000610a2f565b816001811461536457600281036154345760ff84111561541157615411615106565b6001841b91506001600160801b0382111561542e5761542e615106565b50610a2f565b5060208310610133831016604e8410600b841016171561546e575081810a6001600160801b0381111561546957615469615106565b610a2f565b61547883836152f2565b806001600160801b03048211156153cb576153cb615106565b60006115d28383615332565b8082028115828204841417610a2f57610a2f615106565b6001600160801b0382811682821603908082111561146957611469615106565b60005b838110156154ef5781810151838201526020016154d7565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155308160178501602088016154d4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161556d8160288401602088016154d4565b01602801949350505050565b60208152600082518060208401526155988160408501602087016154d4565b601f01601f19169190910160400192915050565b60006115d260ff84166001600160801b0384166153d3565b6000816155d3576155d3615106565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561560357600080fd5b81516115d281614fbb565b60006020828403121561562057600080fd5b815160ff811681146115d257600080fd5b600082516156438184602087016154d4565b919091019291505056fea164736f6c6343000813000a", + "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 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 + }, + "storageLayout": { + "storage": [ + { + "astId": 585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 588, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1318, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1591, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 479, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 33, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_roleMembers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)" + }, + { + "astId": 143, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initializations", + "offset": 0, + "slot": "201", + "type": "t_uint16" + }, + { + "astId": 12184, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 761, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 830, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 12536, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_totalCollected", + "offset": 0, + "slot": "301", + "type": "t_uint256" + }, + { + "astId": 12538, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_rewardsPPM", + "offset": 0, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12540, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceResetMultiplier", + "offset": 4, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12542, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmountMultiplier", + "offset": 8, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12544, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLife", + "offset": 12, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12546, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenPriceDecayHalfLifeOnReset", + "offset": 16, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12548, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_priceDecayHalfLife", + "offset": 20, + "slot": "302", + "type": "t_uint32" + }, + { + "astId": 12553, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_disabledPairs", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_bool)" + }, + { + "astId": 12558, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_tradingStartTimes", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)" + }, + { + "astId": 12564, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_initialPrice", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)" + }, + { + "astId": 12569, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_minTokenSaleAmounts", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)" + }, + { + "astId": 12572, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_targetTokenSaleAmount", + "offset": 0, + "slot": "307", + "type": "t_struct(SaleAmount)14811_storage" + }, + { + "astId": 12578, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "__gap", + "offset": 0, + "slot": "308", + "type": "t_array(t_uint256)43_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)43_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[43]", + "numberOfBytes": "1376" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)2901_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)2901_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_bool)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_struct(Price)14806_storage)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => struct ICarbonVortex.Price)", + "numberOfBytes": "32", + "value": "t_struct(Price)14806_storage" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint128)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint128)", + "numberOfBytes": "32", + "value": "t_uint128" + }, + "t_mapping(t_userDefinedValueType(Token)10748,t_uint32)": { + "encoding": "mapping", + "key": "t_userDefinedValueType(Token)10748", + "label": "mapping(Token => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_struct(AddressSet)2901_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 2900, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)2586_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Price)14806_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.Price", + "members": [ + { + "astId": 14803, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "sourceAmount", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14805, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "targetAmount", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SaleAmount)14811_storage": { + "encoding": "inplace", + "label": "struct ICarbonVortex.SaleAmount", + "members": [ + { + "astId": 14808, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "initial", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 14810, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "current", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)2586_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 2581, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 2585, + "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_userDefinedValueType(Token)10748": { + "encoding": "inplace", + "label": "Token", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/telos/CarbonVortex_Proxy.json b/deployments/telos/CarbonVortex_Proxy.json new file mode 100644 index 00000000..46d4a689 --- /dev/null +++ b/deployments/telos/CarbonVortex_Proxy.json @@ -0,0 +1,369 @@ +{ + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "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" + } + ], + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "transactionIndex": 0, + "gasUsed": "813555", + "logsBloom": "0x000800048200000088000000000000004800400100000000100000000001000000000000100200000000020000000000000000000008000000100000000000000000000000000000000000204000020000000040000000000000000000000000080000000200004000000800000008000020008000000010100000000000000000000100000001010000000000000100000000000000a0000000008000840000000000000000000004000000000400000000000000000000101000200000000000000020000000100040000000140000000000000400000120200000040020000000010000000000000000000000000080000000000000000000000000000000", + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe", + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000005bca3389786385a35bca14c2d0582adc6cb2482e" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0xae6032c8c5e2de64a0ea5bae16212679a17117929d901adc5ad7852d503d8a12" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8", + "logIndex": 3, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x33f05f943b1d9d33ead056b32deb8d9918421c996ac02108cb2753a7c1cc42cb" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 4, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x5f8c28c7dd7c58bccf13b50fb8815ac0278a1edd75b439e06ebfb0bb0a65dce1" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 5, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 6, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x294a5aed6c155d82e90637e2643e9b498d502610ff21b79c0bd25fc843211328" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8c0", + "logIndex": 7, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x0975e374c098c5a9a021fe12dff984574b06a6da66d816004d0a6e12e387c02b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", + "logIndex": 8, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0xdbd15ecc744064a04fd47221c1e039aaebacbc20c59b7b833fe499efb1999cd3" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", + "logIndex": 9, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x5a387f90e98064d45229fc077854834539bef69df2b1447346ce29f8761a158f", + "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", + "logIndex": 10, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 11, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + }, + { + "transactionIndex": 0, + "blockNumber": 365641920, + "transactionHash": "0x5c6d1542fa2c62e70da74a6ecffedcaa2f54fa1afff8613ca8256a82f00d6fcb", + "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa", + "logIndex": 12, + "blockHash": "0x6536ee66706d7c610999ab222404d5fe2130596e492add2d05c8a48a32cd6afe" + } + ], + "blockNumber": 365641920, + "cumulativeGasUsed": "813555", + "status": 1, + "byzantium": true + }, + "args": [ + "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", + "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "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", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/telos/ProxyAdmin.json b/deployments/telos/ProxyAdmin.json new file mode 100644 index 00000000..10316bde --- /dev/null +++ b/deployments/telos/ProxyAdmin.json @@ -0,0 +1,246 @@ +{ + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x40185eb7920012ef0290a2f08a4a65e8b802e4cb182acd4d5c07daf33ca31cd3", + "receipt": { + "to": null, + "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", + "contractAddress": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "transactionIndex": 0, + "gasUsed": "483623", + "logsBloom": "0x00000000820000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000001000000000000000000000000000000000000020000002020000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000040000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4a3085000efc5ded510fdbec843146e491cae75586d4904ca57d71681c548d91", + "transactionHash": "0x40185eb7920012ef0290a2f08a4a65e8b802e4cb182acd4d5c07daf33ca31cd3", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 365641899, + "transactionHash": "0x40185eb7920012ef0290a2f08a4a65e8b802e4cb182acd4d5c07daf33ca31cd3", + "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x4a3085000efc5ded510fdbec843146e491cae75586d4904ca57d71681c548d91" + } + ], + "blockNumber": 365641899, + "cumulativeGasUsed": "483623", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b76a81aff7f4c6687d430aad9cc119d7", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\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\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 Returns the current admin.\\n */\\n function _getAdmin() internal view 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 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(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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\"},\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\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 *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\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(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(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 * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\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 _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\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 _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\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 function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"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/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", + "devdoc": { + "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", + "kind": "dev", + "methods": { + "changeProxyAdmin(address,address)": { + "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." + }, + "getProxyAdmin(address)": { + "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "getProxyImplementation(address)": { + "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgrade(address,address)": { + "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." + }, + "upgradeAndCall(address,address,bytes)": { + "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4735, + "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 641feaaa..2cfa48db 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -454,6 +454,19 @@ const config: HardhatUserConfig = { 'x-apikey': process.env.SEI_RPC_API_KEY || '' } }, + [DeploymentNetwork.Blast]: { + chainId: chainIds[DeploymentNetwork.Blast], + url: rpcUrls[DeploymentNetwork.Blast], + gasPrice, + saveDeployments: true, + live: true, + deploy: [`deploy/scripts/${DeploymentNetwork.Blast}`], + verify: { + etherscan: { + apiKey: VERIFY_API_KEY + } + } + }, [DeploymentNetwork.Sepolia]: { chainId: chainIds[DeploymentNetwork.Sepolia], url: rpcUrls[DeploymentNetwork.Sepolia], @@ -483,6 +496,44 @@ const config: HardhatUserConfig = { privateVerification: true }, + etherscan: { + apiKey: VERIFY_API_KEY, + customChains: [ + { + network: DeploymentNetwork.Blast, + chainId: chainIds[DeploymentNetwork.Blast], + urls: { + apiURL: "https://api.blastscan.io/api", + browserURL: "https://blastscan.io" + } + }, + { + network: DeploymentNetwork.Celo, + chainId: chainIds[DeploymentNetwork.Celo], + urls: { + apiURL: "https://api.celoscan.io/api", + browserURL: "https://celoscan.io" + } + }, + { + network: DeploymentNetwork.Mantle, + chainId: chainIds[DeploymentNetwork.Mantle], + urls: { + apiURL: "https://api.mantlescan.xyz/api", + browserURL: "https://mantlescan.xyz" + } + }, + { + network: DeploymentNetwork.Linea, + chainId: chainIds[DeploymentNetwork.Linea], + urls: { + apiURL: "https://api.lineascan.build/api", + browserURL: "https:///lineascan.build" + } + } + ] + }, + solidity: { compilers: [ { diff --git a/test/forge/CarbonVortex.t.sol b/test/forge/CarbonVortex.t.sol index c5a94ab6..d1989a3b 100644 --- a/test/forge/CarbonVortex.t.sol +++ b/test/forge/CarbonVortex.t.sol @@ -29,7 +29,7 @@ contract CarbonVortexTest is TestFixture { // Test case parser helper VortexTestCaseParser private testCaseParser; - uint32 private constant REWARDS_PPM_DEFAULT = 5000; + uint32 private constant REWARDS_PPM_DEFAULT = 1000; uint32 private constant REWARDS_PPM_UPDATED = 7000; uint32 private constant PRICE_RESET_MULTIPLIER_DEFAULT = 2; diff --git a/utils/Roles.ts b/utils/Roles.ts index 9a86bbc5..7f9f05e6 100644 --- a/utils/Roles.ts +++ b/utils/Roles.ts @@ -11,6 +11,10 @@ export const Roles = { ROLE_FEES_MANAGER: id('ROLE_FEES_MANAGER') }, + Vault: { + ROLE_ASSET_MANAGER: id('ROLE_ASSET_MANAGER') + }, + Voucher: { ROLE_MINTER: id('ROLE_MINTER') } diff --git a/utils/rpcUrls.json b/utils/rpcUrls.json index dd0c359e..72586f73 100644 --- a/utils/rpcUrls.json +++ b/utils/rpcUrls.json @@ -3,8 +3,9 @@ "optimism": "https://optimism.drpc.org", "cronos": "https://cronos-evm.publicnode.com", "rootstock": "https://public-node.rsk.co", - "telos": "https://rpc1.eu.telos.net/evm", + "telos": "https://mainnet15.telos.net/evm", "bsc": "https://binance.llamarpc.com", + "blast": "https://blast.drpc.org", "gnosis": "https://gnosis.publicnode.com", "polygon": "https://rpc.ankr.com/polygon", "manta": "https://pacific-rpc.manta.network/http", @@ -25,7 +26,7 @@ "arbitrum": "https://arbitrum.meowrpc.com", "celo": "https://forno.celo.org", "avalanche": "https://avalanche.drpc.org", - "linea": "https://linea.decubate.com", + "linea": "https://rpc.linea.build", "scroll": "https://rpc.scroll.io", "sepolia": "https://rpc.sepolia.ethpandaops.io", "aurora": "https://mainnet.aurora.dev",